Automated Changelog Generation

Generate release notes from structured commits, choose a release policy, and add changelog generation to CI without treating every merge as a release.

published: reading time: 6 min read author: Geek Workbench updated: November 8, 2026
Quick Summary

Conventional Commits defines commit-message structure. A parser or release tool can turn those messages into release notes, while repository policy decides how they map to versions, which event runs a release, and whether publication is automatic.

Automated Changelog Generation: From Commit History to Release Notes

A changelog explains changes to people who use or maintain a project. Automation can draft it from commit history, but it cannot recover information that the commits never recorded. Teams still need a commit convention, a release policy, and a review step that fits the project.

Format, parser, and release policy

Conventional Commits 1.0.0 defines a commit message structure: a type, optional scope, short description, and optional body or footers. For example:

feat(api): add invoice status lookup
fix: avoid duplicate invoice events
feat!: remove the legacy invoice endpoint

The format does not run a parser or mandate a release trigger. A changelog generator parses a selected commit range and renders entries. A release tool or repository policy decides which messages appear, how they affect a version, and whether a release is published. See Commit Message Conventions for the commit-writing side.

Stage Question the project must answer
Commit format Which types, scopes, and breaking-change markers do contributors use?
Commit parsing Which commits belong in user-facing notes?
Version policy Which parsed changes mean patch, minor, major, or no release?
Trigger Does a release job run on a branch update, a tag, or a manual approval?
Publication Does the job draft notes, create a tag, publish a package, or do several of these?

A tool may offer defaults, but those are still configuration choices. For example, semantic-release uses plugins and release branches; repository configuration determines how it analyzes commits and publishes a release.

From commits to release notes

Suppose a project has these commits since its last release:

fix: avoid duplicate invoice events
feat(api): add invoice status lookup
feat!: remove the legacy invoice endpoint

A parser can group the fix and feature for the notes and mark the breaking change. The configured release policy then decides the version change. A release job may run after a push to the main branch and decide that no release is due, or it may draft notes for a tag that a maintainer creates later. A merge to the main branch does not have to publish anything.

A typical flow looks like this:

flowchart LR
    A[Commits in selected range] --> B[Parser]
    B --> C[Include, group, and format changes]
    C --> D[Review generated notes]
    D --> E{Release policy}
    E -->|No release| F[Keep notes as draft]
    E -->|Release approved| G[Tag or publish]

Generate a changelog locally

The current Conventional Changelog CLI documentation, checked 2026-11-08, shows generating output with a preset. Install the generator and the preset selected by the project, then run it from the repository root:

npm install --save-dev conventional-changelog conventional-changelog-angular
npx conventional-changelog -p angular

To update a changelog file in place, the documented CLI options include an input file and --same-file:

npx conventional-changelog -p angular -i CHANGELOG.md --same-file

The angular preset is only one commit convention. Pick a preset that matches the messages the team writes, and check the selected tool’s current options before scripting around them. Before adopting automation on an existing repository, generate a sample from a known tag range and review the result. Old commits may not follow the new format.

Choose the release trigger

A release trigger is repository policy. Three common choices are:

Trigger Useful when Check before enabling
Push to a release branch Each accepted commit should be evaluated for a release. The release tool may find no release-worthy change; branch protection and credentials still apply.
A version tag A person or another process has approved the release boundary. Make sure the notes use the intended previous and current tags.
Manual or scheduled run Releases need a review window or follow a calendar. Define who starts the run and how the selected commit range is chosen.

For a tag range, inspect the commits between the prior and current tags:

git log --oneline v1.2.0..v1.3.0

A CI job can generate notes after a push to main, but that event only starts the job. The configured release policy decides whether to update a file, create a tag, or publish. If CI checks commit messages to skip work, keep that filter consistent with the parser’s release rules so a valid change is not accidentally ignored.

Enforce the message format

A local commit hook can catch a malformed message before it reaches CI. For Husky 9.1.7, the following uses the setup documented in the v9.1.7 release and the current Husky guide, checked 2026-11-08:

npm install --save-dev husky@9.1.7 @commitlint/cli @commitlint/config-conventional
npx husky init
mkdir -p .husky
printf '%s\n' 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg

Configure commitlint to use the project’s accepted types and scopes. Keep the same check in CI: local hooks can be skipped or unavailable, so the protected branch should enforce the rule too.

Common problems

Problem Why it happens What to do
Notes are empty The selected range has no commits the parser recognizes, or the preset does not match the messages. Check the range and parser configuration; test on a small, known release.
A squash merge loses useful detail The final squash message may not preserve the original commit structure. Require the squash title/body to follow the convention or generate notes from pull-request metadata.
The job misses older commits A shallow checkout may not include the tags or history the tool needs. Fetch the history and tags required by the selected range.
A breaking change is not marked The commit lacks a marker or footer the parser understands. Agree on one breaking-change convention and enforce it in review or commitlint.
Every push creates a release The trigger and release policy are treated as the same setting. Let the release tool evaluate the changes, or require a tag or manual approval.

Automation can format commit history; it cannot tell whether a vague message accurately describes user impact. Review generated notes before publication, especially breaking changes and security fixes.

Further Reading

Conclusion

Treat generated notes as an output of three explicit choices: commit format, release policy, and trigger. Test those choices on a real tag range, review the draft, and automate publication only when the project is ready for that policy.

Category

Related Posts

Commit Message Conventions and Release Policy

Conventional Commits defines a message format; commitlint and Husky v9 can enforce it, while release rules control changelogs and version bumps.

#git #version-control #conventional-commits

Automated Releases and Tagging

Automate Git releases with tags, release notes, GitHub Releases, and CI/CD integration for consistent, repeatable software delivery.

#git #version-control #automation

Git Aliases and Custom Commands: Productivity Through Automation

Build a small set of Git aliases, understand shell alias risks, and decide when a separate git- command script is easier to maintain.

#git #version-control #aliases