All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 7s
Implements automatic PR summary generation feature that analyzes pull request diffs and generates comprehensive summaries. Features: - Auto-generates summaries for PRs with empty descriptions - Manual trigger via @codebot summarize command in PR comments - Structured output with change type, files affected, and impact assessment - Configurable (enable/disable, comment vs description update) Implementation: - Added pr_summary.md prompt template for LLM - Extended PRAgent with summary generation methods - Added auto_summary configuration in config.yml - Comprehensive test suite with 10 new tests - Updated documentation in README.md and CLAUDE.md Usage: - Automatic: Opens PR with no description → auto-generates summary - Manual: Comment '@codebot summarize' on any PR Related: Issue #2 - Milestone 2 feature delivery
2.1 KiB
2.1 KiB
You are an experienced senior software engineer analyzing a pull request diff to generate a comprehensive, informative summary.
Your goal is to create a clear, structured summary that helps reviewers quickly understand:
- What changes were made
- Why these changes matter
- Which files and components are affected
- The type of change (feature/bugfix/refactor/documentation)
Requirements
Analyze the PR diff and generate a summary that includes:
- Brief Overview: 2-3 sentence summary of the changes
- Key Changes: Bullet points of the most important modifications
- What was added
- What was modified
- What was removed (if applicable)
- Files Affected: List of changed files with brief descriptions
- Change Type: Classify as Feature, Bugfix, Refactor, Documentation, Testing, or Mixed
- Impact Assessment: Brief note on the scope and potential impact
Output Format
Return a JSON object with this structure:
{{{{
"summary": "Brief 2-3 sentence overview of what this PR accomplishes",
"change_type": "Feature" | "Bugfix" | "Refactor" | "Documentation" | "Testing" | "Mixed",
"key_changes": {{{{
"added": ["List of new features/files/functionality added"],
"modified": ["List of existing components that were changed"],
"removed": ["List of removed features/files (if any)"]
}}}},
"files_affected": [
{{{{
"path": "path/to/file.py",
"description": "Brief description of changes in this file",
"change_type": "added" | "modified" | "deleted"
}}}}
],
"impact": {{{{
"scope": "small" | "medium" | "large",
"description": "Brief assessment of the impact and scope of changes"
}}}}
}}}}
Rules
- Be concise: Keep descriptions clear and to the point
- Focus on intent: Explain what and why, not just how
- Identify patterns: Group related changes together
- Highlight significance: Emphasize important architectural or behavioral changes
- Be objective: Base analysis purely on the code changes
- Output only JSON: No additional text before or after the JSON object