Generate release notes from git history and pull requests
Generate release notes by analyzing git history and pull requests. This is useful when:
git describe --tags --abbrev=0 2>/dev/null || echo "No tags yet"git log $(git describe --tags --abbrev=0 2>/dev/null)..HEAD --pretty=format:"%h %s (%an)" 2>/dev/null | head -50 || echo "No previous tags - showing recent commits" && git log --oneline -20gh pr list --state merged --limit 20 --json number,title,author,mergedAt --jq '.[] | "#\(.number) \(.title) (@\(.author.login))"' 2>/dev/null || echo "gh CLI not available or not authenticated"Generate comprehensive release notes by analyzing git history and pull requests. This complements the changelog-based /release-notes command by working directly from source control.
Present the generated release notes:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GENERATED RELEASE NOTES
(from git history)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Based on X commits since vY.Z.A
### Features (feat:)
- Description from commit/PR (#123) - @author
### Bug Fixes (fix:)
- Description from commit/PR (#124) - @author
### Documentation (docs:)
- Description from commit
### Refactoring (refactor:)
- Description from commit
### Other Changes
- Commits that don't follow conventional commits
### Contributors
Thanks to the following contributors:
- @username1
- @username2
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Map conventional commit prefixes to changelog categories:
| Commit Prefix | Changelog Category | Include? |
|---|---|---|
feat: |
Added | Yes |
fix: |
Fixed | Yes |
docs: |
Changed (Documentation) | Yes |
refactor: |
Changed | Yes |
perf: |
Performance | Yes |
test: |
Changed (Testing) | Optional |
chore: |
Changed | Depends on impact |
ci: |
(skip) | Usually no |
style: |
(skip) | Usually no |
After generating notes, identify potential issues:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
QUALITY CHECKS
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Commits without conventional commit format:
- abc1234 "Update readme"
- def5678 "Fix thing"
ā PRs merged without changelog entries:
- #142 "Add new feature" (@contributor)
ā Breaking changes detected (look for ! or BREAKING CHANGE):
- feat!: Remove deprecated API endpoint
ā Large changes that may warrant detailed notes:
- #145 "Refactor authentication system" (12 files changed)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
If CHANGELOG.md exists, compare and report discrepancies:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
CHANGELOG COMPARISON
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Commits WITHOUT corresponding changelog entry:
ā abc1234 feat: add user preferences (#142)
ā def5678 fix: memory leak in cache handler
Changelog entries WITHOUT corresponding commit:
? "Added dark mode support" - no matching commit found
Entries that match:
ā feat: adversarial review mode (#140) ā "Adversarial Review Mode"
ā fix: stale status detection (#141) ā "False Positive Stale Detection"
Summary: 2 missing from changelog, 1 orphaned entry, 5 matched
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
| Use Case | Command |
|---|---|
| Generate notes from well-maintained CHANGELOG | /release-notes |
| Audit changelog completeness | /release-notes-from-git |
| CHANGELOG is incomplete or missing | /release-notes-from-git |
| Need contributor acknowledgments | /release-notes-from-git |
| Want PR links and numbers | /release-notes-from-git |
| Need specific output format (Slack, Discord) | /release-notes |
gh to be authenticated