Changelog writer from git commits
Generate structured changelogs from conventional commit history. Parse feat/fix/breaking prefixes, group by scope, and emit markdown ready for GitHub releases.
Ingredients
- Conventional commits (feat:, fix:, chore:)
- git log with --grep filters
- Node.js script or shell pipeline
- Optional: GitHub CLI for release creation
Steps
- 1Determine the tag range:
git describe --tags --abbrev=0 HEAD^toHEAD. - 2Collect commits:
git log --oneline --no-merges TAG..HEAD. - 3Parse prefixes into buckets: Features, Fixes, Breaking Changes.
- 4Emit markdown with version header, grouped lists, and a footer linking to the full diff.
Pro tip: Pipe the output directly into gh release create v2.1.0 --notes-file - for one-command release notes.