Generating Release Notes From Git History
A practical pipeline for turning raw commits into notes customers can read.

Generating release notes from Git history requires more than collecting commit messages. A useful pipeline structures the input, selects the right release range, removes internal noise, and translates the remaining changes into language the audience understands. Generators handle the mechanical work. An optional AI layer handles translation, provided that its claims stay grounded in the changes shipped.
Why git history is rich source material but poor release notes on its own
refactor: extract payment validation into separate service tells a reviewer what moved in the code. It tells a customer little about the product. “Payment processing is now faster and more reliable” would describe a useful outcome, but only if the change actually delivered it.
Git history records changes to a codebase, while release notes explain their significance to people who depend on it. A generator can extract commits, group them, and format a CHANGELOG.md for developers and integrators. It cannot establish a customer benefit from a type prefix alone. The pipeline therefore needs a deliberate boundary between recording a change and explaining its effect.
How Conventional Commits give the pipeline something to work with
The Conventional Commits specification defines the machine-parsable format type(scope): description. A message such as feat: add CSV export for dashboard reports gives a generator both a category and a meaningful description. By contrast, “fix stuff” supplies neither reliably.
The prefix helps place a change under features, fixes, or housekeeping, while the optional scope identifies its subsystem. For example, feat(auth): support OAuth 2.0 PKCE flow and fix(payments): handle timeout on Stripe webhook retry distinguish changes across product surfaces. Breaking changes use a ! after the type or a BREAKING CHANGE: footer so generators can separate them from ordinary fixes.
These distinctions depend on consistent input across the team. Even when AI coding assistants make commits in quick succession, the messages still need to say what changed. The practical safeguard is to lint messages in CI and require a type prefix before merge, rather than relying on a convention documented but unenforced.
What the main open-source generators actually do with those commits
git-cliff provides a Rust-based generator with regex-based parsing, custom templates, and monorepo support. Installation uses cargo install git-cliff, and git-cliff --output CHANGELOG.md writes the result. It suits teams that need detailed control over formatting or work outside the Node.js ecosystem. auto-changelog takes a more forgiving approach, generating from tags and commit history without requiring strict Conventional Commits. Its lower entry barrier comes with less useful grouping.
semantic-release extends automation beyond the changelog into release decisions. It reads commit types to determine the semantic version, generates notes, tags the release, and publishes from CI. Strict commit discipline is essential here. A malformed breaking-change message can leave the required major bump undetected. Google’s open-source release-please integrates with GitHub Actions to generate conventional-commit-based changelogs, with an LLM step added downstream if needed.
The Python project release-notes-generator groups breaking changes, features, fixes, refactoring, documentation, CI/CD, and chores. It outputs Markdown, text, or JSON and retains non-conventional commits under “Other Changes.” These tools differ in scope, but share a boundary. Grouping and formatting leave the underlying language largely unchanged.
Using git log to extract the right commits for a given release range
git log --pretty=format:"%s" v1.0.0..HEAD extracts commit subjects reachable from HEAD but not from the specified tag. When that tag represents the previous release, the range selects the changes for the next notes. The reference is a substantive choice. The wrong starting point changes what seems to be in the release.
Adding --no-merges removes merge messages such as “Merge pull request #247 from feature/dark-mode,” which rarely describe a user-visible change. For a compact Slack or email summary, git log $PREV_TAG..HEAD --oneline --no-merges provides a short list suitable for a prompt or script. Subject-only extraction is concise, but its usefulness still depends on what those subjects say.
Filtering before drafting: why noise removal is as important as generation
A release range contains more than users need to read. Types such as chore, refactor, test, ci, build, and style usually describe internal work and should be excluded or collapsed. Documentation needs a more selective rule. Internal documentation is usually noise, while public API documentation can change how someone uses the product.
Dependency updates show why the audience must influence filtering. They are usually unhelpful in customer notes but can be relevant to integrators maintaining compatibility. A separate section or inclusion flag accommodates that distinction without filling every release with maintenance details. The changes that stay in the notes show whose needs matter to the team.
Type-based filtering handles the straightforward cases. A feat commit can still describe an internal API change with no user surface. Scoring how well a change fits the product positioning helps make that harder choice. Moving these decisions upstream reduces the burden on an AI prompt, where inconsistent input makes filtering less reliable.
Three methods for turning filtered commits into user-facing language
Pure generator output preserves developer language while adding categories and traceability. It works well for internal changelogs and releases of developer tools, where readers know the terms. This method requires no AI translation layer. Its limitation appears when a customer encounters an entry such as “extract request validation into middleware,” which explains implementation without explaining product impact.
An LLM layer over commit messages adds that translation step. The flow runs from a release tag through extraction, filtering, an API call, and formatted output. The prompt specifies the audience, categories, exclusions, and rewriting rules. Generic messages such as “wip” or “misc fixes” sharply limit the result because the model has little evidence to interpret.
An LLM layer over diffs is an escape hatch for poor commit hygiene. The changed code provides information missing from sparse messages, but large diffs cost more to process and require chunking or summarization. More input does not guarantee better abstraction. ReleaseEval found the strongest performance with structured commit trees, while long, raw diffs made semantic summarization difficult. Well-written PR titles and descriptions offer a practical middle ground without the full diff’s token cost.
Building a Python-based pipeline with GitPython and an LLM API
A lightweight implementation starts with pip install anthropic gitpython python-dotenv. GitPython handles extraction, the API supplies generation, and the script writes Markdown. A get_commits_since_tag() function can use repo.iter_commits(f"{since_tag}..HEAD", max_count=100), falling back to the most recent tag when none is supplied. That limit bounds the extraction. Each returned dictionary includes the hash, message, author, date, and files_changed, giving the model a rough indication of magnitude without sending the diff.
The generation prompt then defines the transformation explicitly. It groups relevant changes under New Features, Bug Fixes, Infrastructure/DevOps, Dependencies, and Breaking Changes, omitting empty categories. It asks for end-user wording, expanded abbreviations, corrected typos, past tense, and Markdown only. It leaves out merge commits, version bumps, and minor chores. The example model pairing uses claude-sonnet-4-6 for full notes and claude-haiku-4-5-20251001 for the cheaper derivative Slack summary.
The script’s CLI exposes --repo, --since, --version, --output, --slack, and --append. The same setup works in.NET with an Azure AI call such as aiClient.GetCompletionsAsync(deploymentName, prompt). Python is not a requirement for the approach. For downstream processing, the generator’s --format json option allows jq '.sections.feat' to select features for another publishing surface.
Wiring the pipeline into CI so it runs on every release without manual steps
GitHub Actions can trigger generation on the release event with types: [published] or on tag pushes matching v*.*.*. The generator’s documented command is release-notes --from ${{ github.event.release.target_commitish }} --to ${{ github.sha }} --version ${{ github.event.release.tag_name }} --repo-url ${{ github.server_url }}/${{ github.repository }} --output release-notes.md. The earlier range-selection rule still applies. The starting reference must represent the intended release boundary rather than being accepted blindly from an event field.
The next command, gh release edit ${{ github.event.release.tag_name }} --notes-file release-notes.md, updates the GitHub Release body. A semantic-release pipeline can instead own versioning, tagging, and publication, with an LLM script called as a plugin step. GitLab CI follows the same pattern on tag pushes, using git log --pretty=format:"%s" $START_REF..HEAD before running the Python job.
API keys should be kept in CI secrets and passed in as environment variables such as ANTHROPIC_API_KEY, with no keys hard-coded. A downstream API call can publish the generated file to Changefeed, Headway, or Beamer when deployment completes. Where approval is required, it remains a gate without requiring someone to assemble the notes in a text editor.
What degrades AI output quality and how to guard against it
An LLM can invent a benefit or misread the scope of a change. Without review, those errors can reach users. Structured commit messages and PR descriptions provide better grounding than long, unstructured diffs, but they do not make the output authoritative. The appropriate safeguard is suggest-before-publish, with a team member comparing the draft against the actual PR list before approval.
Voice drift is a separate failure mode. A model can produce accurate prose that sounds generic, weakening the consistency of a product’s communication. Few-shot examples of release notes the team likes show the model what to aim for. Boundary-pinned traits further narrow the instruction, such as “plain-spoken but not casual; precise but not jargon-heavy.”
Neither safeguard compensates fully for inadequate source material. Messages such as “wip” offer little factual grounding and no useful wording to preserve. A commitlint check or a similar tool helps keep the input structured. When commit discipline is inconsistent, PR descriptions supply the developer’s explanation of what changed and why, giving reviewers and the model a stronger basis for the draft.
What good release notes look like in practice, and why the format is a signal
release-notes-generator illustrates a developer-facing entry under “New Features” with “orders: add bulk order creation endpoint (closes #42).” The subsystem and issue reference support traceability. That is useful for an engineering audience. A customer-facing entry prioritizes the action now available, as in “You can now sign in with Google or GitHub,” describing the result of “Implemented OAuth 2.0 authentication flow.”
The same filtered input can support both artifacts through different formats or prompts. Release notes with sections group features, fixes, and infrastructure so readers can find the changes that matter to them. Narrative entries add context and rationale before the individual changes. The layout choice expresses what the reader is expected to need.
Breaking changes need to stand out in any format. The generator’s example states, “The /v1/accounts endpoint has been removed. Use /v2/accounts instead.” The removal and migration path are both explicit. Burying that information among fixes can expose API consumers to production failures. Publishing consistently on every deploy then makes the changelog a dependable record, with automation sustaining a cadence that manual writing may not support.
Deciding which approach fits your team's current state
Teams that follow strict Conventional Commits and write for developers should start with semantic-release or release-please. An LLM becomes useful when non-developers also need a plain-language account of the release.
Teams with moderate hygiene and mixed audiences should extract with git-cliff or the Python generator, then supplement the commits with PR descriptions for translation. With a suggest-before-publish workflow, people begin with a draft to review and edit. Solo developers and small teams can start with a single GitHub Actions job that combines git log $PREV_TAG..HEAD --oneline --no-merges with an LLM API call. Sending its output to a free-tier changelog platform saves the team a separate step to publish the notes.
More selective pipelines can later score changes against product positioning before drafting. That is an optional extension of filtering. The durable rule is that no release is complete until its entry is written. CI keeps the cost of enforcing that rule low, while structured evidence and review keep the entry worth reading.


