feat: Add @codebot changelog command for Keep a Changelog format generation
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 41s
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 41s
Implements PR changelog generator that analyzes diffs and generates Keep a Changelog format entries ready for CHANGELOG.md. Features: - Generates structured changelog entries (Added/Changed/Fixed/etc.) - Automatically detects breaking changes - Includes technical details (files, LOC, components) - User-focused language filtering out noise - Ready to copy-paste into CHANGELOG.md Implementation: - Added changelog.md prompt template with Keep a Changelog format - Implemented _handle_changelog_command() in PRAgent - Added _format_changelog() for markdown formatting - Updated PRAgent.can_handle() to route changelog commands - Added 'changelog' to config.yml commands list Workflow Safety (prevents duplicate runs): - Added '@codebot changelog' to ai-comment-reply.yml conditions - Excluded from ai-chat.yml to prevent duplication - Only triggers on PR comments (not issues) - Manual command only (no automatic triggering) Testing: - 9 comprehensive tests in TestChangelogGeneration class - Tests command detection, formatting, config validation - Verifies prompt formatting and Keep a Changelog structure Documentation: - Updated README.md with changelog command and examples - Added detailed implementation guide in CLAUDE.md - Included example output and use cases Related: Milestone 2 feature - PR changelog generation for release notes
This commit is contained in:
50
README.md
50
README.md
@@ -12,7 +12,7 @@ Enterprise-grade AI code review system for **Gitea** with automated PR review, i
|
||||
| **PR Summaries** | Auto-generate comprehensive PR summaries with change analysis and impact assessment |
|
||||
| **Issue Triage** | On-demand classification, labeling, priority assignment via `@codebot triage` |
|
||||
| **Chat** | Interactive AI chat with codebase search and web search tools |
|
||||
| **@codebot Commands** | `@codebot summarize`, `explain`, `suggest`, `triage`, `review-again` in comments |
|
||||
| **@codebot Commands** | `@codebot summarize`, `changelog`, `explain`, `suggest`, `triage`, `review-again` in comments |
|
||||
| **Codebase Analysis** | Health scores, tech debt tracking, weekly reports |
|
||||
| **Security Scanner** | 17 OWASP-aligned rules for vulnerability detection |
|
||||
| **Enterprise Ready** | Audit logging, metrics, Prometheus export |
|
||||
@@ -191,6 +191,7 @@ In any PR comment:
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `@codebot summarize` | Generate a comprehensive PR summary with changes, files affected, and impact |
|
||||
| `@codebot changelog` | Generate Keep a Changelog format entries ready for CHANGELOG.md |
|
||||
| `@codebot review-again` | Re-run AI code review on current PR state without new commits |
|
||||
|
||||
#### PR Summary (`@codebot summarize`)
|
||||
@@ -233,6 +234,53 @@ This PR implements automatic PR summary generation...
|
||||
Adds new feature without affecting existing functionality
|
||||
```
|
||||
|
||||
#### Changelog Generator (`@codebot changelog`)
|
||||
|
||||
**Features:**
|
||||
- 📋 Generates Keep a Changelog format entries
|
||||
- 🏷️ Categorizes changes (Added/Changed/Fixed/Removed/Security)
|
||||
- ⚠️ Detects breaking changes automatically
|
||||
- 📊 Includes technical details (files, LOC, components)
|
||||
- 📝 Ready to copy-paste into CHANGELOG.md
|
||||
|
||||
**When to use:**
|
||||
- Preparing release notes
|
||||
- Maintaining CHANGELOG.md
|
||||
- Customer-facing announcements
|
||||
- Version documentation
|
||||
|
||||
**Example output:**
|
||||
```markdown
|
||||
## 📋 Changelog for PR #123
|
||||
|
||||
### ✨ Added
|
||||
- User authentication system with JWT tokens
|
||||
- Password reset functionality via email
|
||||
|
||||
### 🔄 Changed
|
||||
- Updated database schema for user table
|
||||
- Refactored login endpoint for better error handling
|
||||
|
||||
### 🐛 Fixed
|
||||
- Session timeout bug causing premature logouts
|
||||
- Security vulnerability in password validation
|
||||
|
||||
### 🔒 Security
|
||||
- Fixed XSS vulnerability in user input validation
|
||||
|
||||
---
|
||||
|
||||
### ⚠️ BREAKING CHANGES
|
||||
- **Removed legacy API endpoint /api/v1/old - migrate to /api/v2**
|
||||
|
||||
---
|
||||
|
||||
### 📊 Technical Details
|
||||
- **Files changed:** 15
|
||||
- **Lines:** +450 / -120
|
||||
- **Main components:** auth/, api/users/, database/
|
||||
```
|
||||
|
||||
#### Review Again (`@codebot review-again`)
|
||||
|
||||
**Features:**
|
||||
|
||||
Reference in New Issue
Block a user