Feature: Automatic PR Summary Generator #17

Closed
opened 2025-12-29 09:55:12 +00:00 by Latte · 1 comment
Owner

✍️ Feature: Automatic PR Summary Generator

Priority: MEDIUM
Effort: 2-3 hours
Value: MEDIUM
Labels: feature, milestone-2, automation, quality

Description

Auto-generate PR description from code diff when a PR is created without a description, ensuring all PRs have meaningful documentation.

Use Cases

  • Developers who forget to write descriptions
  • Quick PR creation workflow
  • Standardized PR format across team
  • Consistency in PR documentation

Tasks

Day 1: Webhook Setup

  • Configure webhook for pull_request.opened event
  • Detect empty PR descriptions
  • Implement auto-trigger logic

Day 2: Summary Generation

  • Analyze diff and extract key information
  • Generate structured summary
  • Include: what changed, why, files affected
  • Add categorization (feature/bugfix/refactor)

Day 3: Integration & Polish

  • Post summary as PR description or first comment
  • Add option to update vs. comment
  • Include disclaimer (auto-generated)
  • Allow manual trigger via @codebot summarize

Days 4-5: Testing & Deployment

  • Test with various PR types
  • Validate summary quality
  • User acceptance testing
  • Documentation
  • Deploy to production

Files to Modify

tools/ai-review/
├── agents/pr_agent.py
├── webhooks/pr_handler.py
└── prompts/pr_summary.md (new)

Implementation Details

Trigger Conditions:

  • PR opened with empty description
  • OR explicit command: @codebot summarize

Summary Structure:

<!-- Auto-generated by @codebot -->

## Summary
Brief overview of changes

## Changes
- Added: X
- Modified: Y
- Removed: Z

## Files Affected
- `path/to/file1.py` - Description
- `path/to/file2.js` - Description

## Type
[Feature/Bugfix/Refactor/Documentation]

Acceptance Criteria

  • Triggers automatically on empty PR descriptions
  • Can be manually triggered with @codebot summarize
  • Generates summary within 20 seconds
  • Includes what/why/files affected
  • Marks as auto-generated
  • Does not override manual descriptions
  • Respects opt-out configuration

Success Metrics

  • 60%+ of PRs have good descriptions after rollout
  • Reduced "missing description" review comments
  • Faster review times (baseline vs. 30 days post-launch)

Testing Checklist

  • Empty description → auto-generates
  • Existing description → does not override
  • Manual trigger works
  • Various PR sizes handled correctly
  • Summary quality validated by team
  • Parent: #1 (Milestone 2 Epic)
  • Related: #2 (Code Diff Explainer)
  • Related: #3 (PR Changelog Generator)
## ✍️ Feature: Automatic PR Summary Generator **Priority:** MEDIUM **Effort:** 2-3 hours **Value:** MEDIUM **Labels:** `feature`, `milestone-2`, `automation`, `quality` ### Description Auto-generate PR description from code diff when a PR is created without a description, ensuring all PRs have meaningful documentation. ### Use Cases - Developers who forget to write descriptions - Quick PR creation workflow - Standardized PR format across team - Consistency in PR documentation ### Tasks **Day 1: Webhook Setup** - [ ] Configure webhook for `pull_request.opened` event - [ ] Detect empty PR descriptions - [ ] Implement auto-trigger logic **Day 2: Summary Generation** - [ ] Analyze diff and extract key information - [ ] Generate structured summary - [ ] Include: what changed, why, files affected - [ ] Add categorization (feature/bugfix/refactor) **Day 3: Integration & Polish** - [ ] Post summary as PR description or first comment - [ ] Add option to update vs. comment - [ ] Include disclaimer (auto-generated) - [ ] Allow manual trigger via `@codebot summarize` **Days 4-5: Testing & Deployment** - [ ] Test with various PR types - [ ] Validate summary quality - [ ] User acceptance testing - [ ] Documentation - [ ] Deploy to production ### Files to Modify ``` tools/ai-review/ ├── agents/pr_agent.py ├── webhooks/pr_handler.py └── prompts/pr_summary.md (new) ``` ### Implementation Details **Trigger Conditions:** - PR opened with empty description - OR explicit command: `@codebot summarize` **Summary Structure:** ```markdown <!-- Auto-generated by @codebot --> ## Summary Brief overview of changes ## Changes - Added: X - Modified: Y - Removed: Z ## Files Affected - `path/to/file1.py` - Description - `path/to/file2.js` - Description ## Type [Feature/Bugfix/Refactor/Documentation] ``` ### Acceptance Criteria - [ ] Triggers automatically on empty PR descriptions - [ ] Can be manually triggered with `@codebot summarize` - [ ] Generates summary within 20 seconds - [ ] Includes what/why/files affected - [ ] Marks as auto-generated - [ ] Does not override manual descriptions - [ ] Respects opt-out configuration ### Success Metrics - [ ] 60%+ of PRs have good descriptions after rollout - [ ] Reduced "missing description" review comments - [ ] Faster review times (baseline vs. 30 days post-launch) ### Testing Checklist - [ ] Empty description → auto-generates - [ ] Existing description → does not override - [ ] Manual trigger works - [ ] Various PR sizes handled correctly - [ ] Summary quality validated by team ### Related Issues - Parent: #1 (Milestone 2 Epic) - Related: #2 (Code Diff Explainer) - Related: #3 (PR Changelog Generator)
Latte added this to the Milestone 2: PR Workflow Enhancement milestone 2025-12-29 09:55:13 +00:00
Latte added this to the Development Roadmap project 2025-12-29 09:55:13 +00:00
Author
Owner

finished and merged in dev

finished and merged in dev
Latte closed this issue 2025-12-29 10:43:23 +00:00
Latte moved this to Done in Development Roadmap on 2025-12-29 10:43:30 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Hiddenden/openrabbit#17