TExcelTAD
Home › Release Engineering & CI/CD › Changelogs for Humans

Changelogs for Humans

A changelog is written for the people who use your software: they want to know whether to upgrade, what will break, and what they get. A list of commit subjects is raw material for that, not the result. This lesson is about the target; the next two show how git-cliff produces most of it automatically.

Changelog vs release notes vs commit log

Document Reader Content
Commit log developers of the project every change, in the developer's words
Changelog (CHANGELOG.md) users and integrators, over time every release, newest first, notable changes grouped by kind
Release notes (GitHub Release body, store "What's new", announcement) users of this release the changelog entry for one version, often with highlights, upgrade steps and thanks

Release notes are usually the changelog section for that version, with a short human-written introduction on top.

The Keep a Changelog format

Keep a Changelog is the most widely copied format:

markdown
# Changelog

All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

## [Unreleased]

### Added
- `--json` output for the `list` command.

## [2.0.0] - 2026-01-15

### Changed
- **Breaking:** configuration files must use YAML 1.2 booleans (`true`/`false`); `yes`/`no`
  are now strings. Run `tool migrate-config` to convert old files.

### Removed
- The `--legacy` flag, deprecated since 1.8.0.

### Fixed
- Crash when the input file is empty (#412).

## [1.9.1] - 2025-12-02

### Security
- Limit decompressed input size to 512 MiB (CVE-2025-XXXXX).

[Unreleased]: https://github.com/acme/tool/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/acme/tool/compare/v1.9.1...v2.0.0
[1.9.1]: https://github.com/acme/tool/compare/v1.9.0...v1.9.1

Its principles, which apply whatever tool writes the file:

  • Newest first, one section per version, with an ISO date (YYYY-MM-DD).
  • An Unreleased section at the top collects changes as they land, so the release itself is just "rename Unreleased to the version".
  • Group by kind of change: Added, Changed, Deprecated, Removed, Fixed, Security. Users scan for "Removed" and "Security" first.
  • Breaking changes say what to do, not only what changed.
  • Link versions to the diff between tags, so the curious can see the details.
  • Not everything is notable: refactors, CI tweaks and dependency bumps with no user-visible effect stay out.

Validating a changelog

A changelog is a file like any other, so CI can check it. This validator enforces the rules above: an Unreleased section, versions in descending SemVer order with valid dates, known section names and no empty versions:

js · try it yourself
const changelog = `# Changelog

## [Unreleased]

### Added
- \`--json\` output for the list command.

## [2.0.0] - 2026-01-15

### Changed
- **Breaking:** YAML 1.2 booleans only.

### Fixed
- Crash on empty input (#412).

## [1.10.0] - 2025-12-20

### Improved
- Faster startup.

## [1.9.1] - 2025-12-02

## [1.12.0] - 2025-11-30

### Added
- Plugins.
`;

const SECTIONS = new Set(['Added', 'Changed', 'Deprecated', 'Removed', 'Fixed', 'Security']);
const cmp = (a, b) => { for (let i = 0; i < 3; i++) if (a[i] !== b[i]) return a[i] - b[i]; return 0; };

function validate(text) {
  const problems = [];
  const versions = [];          // { name, nums, line, sections, items }
  let current = null;
  text.split('\n').forEach((line, i) => {
    const n = i + 1;
    let m;
    if ((m = /^## \[(.+?)\](?: - (\S+))?$/.exec(line))) {
      current = { name: m[1], date: m[2], line: n, sections: 0, items: 0 };
      versions.push(current);
      if (m[1] !== 'Unreleased') {
        if (!/^\d+\.\d+\.\d+$/.test(m[1])) problems.push(`line ${n}: "${m[1]}" is not a version`);
        if (!m[2] || !/^\d{4}-\d{2}-\d{2}$/.test(m[2])) problems.push(`line ${n}: ${m[1]} needs a YYYY-MM-DD date`);
        current.nums = m[1].split('.').map(Number);
      }
    } else if ((m = /^### (.+)$/.exec(line))) {
      if (!SECTIONS.has(m[1])) problems.push(`line ${n}: unknown section "${m[1]}"`);
      if (current) current.sections++;
    } else if (/^- /.test(line) && current) {
      current.items++;
    }
  });
  if (versions[0]?.name !== 'Unreleased') problems.push('the first section should be [Unreleased]');
  const released = versions.filter((v) => v.nums);
  for (let i = 1; i < released.length; i++) {
    if (cmp(released[i - 1].nums, released[i].nums) <= 0) {
      problems.push(`line ${released[i].line}: ${released[i].name} is listed below ${released[i - 1].name} but is not older`);
    }
  }
  for (const v of released) if (!v.items) problems.push(`line ${v.line}: ${v.name} has no entries`);
  return problems;
}

const problems = validate(changelog);
console.log(problems.length ? problems.join('\n') : 'changelog ok');
console.log(`${problems.length} problem(s)`);
line 18: unknown section "Improved"
line 23: 1.12.0 is listed below 1.9.1 but is not older
line 21: 1.9.1 has no entries
3 problem(s)

Version ordering uses numeric comparison, so 1.10.0 above 1.9.1 is accepted and 1.12.0 below 1.9.1 is caught: the same lesson as in Semantic Versioning & Precedence.

Extracting release notes from the changelog

The release job needs one version's section as the GitHub Release body. A few lines of awk do it, and they work on any Keep a Changelog file, including one git-cliff writes:

bash · try it yourself
cat > CHANGELOG.md <<'MD'
# Changelog

## [Unreleased]

## [2.0.0] - 2026-01-15

### Changed
- **Breaking:** YAML 1.2 booleans only.

### Fixed
- Crash on empty input (#412).

## [1.9.1] - 2025-12-02

### Security
- Limit decompressed input size.
MD
notes() {   # print the body of the "## [$1]" section
  awk -v v="$1" '
    /^## \[/ { if (found) exit; found = index($0, "## [" v "]") == 1; next }
    found' CHANGELOG.md | sed -e '/./,$!d'
}
notes 2.0.0 > release-notes.md
cat release-notes.md
echo "--- 1.9.1"
notes 1.9.1
echo "--- 3.0.0 (missing): $(notes 3.0.0 | wc -l) lines"
### Changed
- **Breaking:** YAML 1.2 booleans only.

### Fixed
- Crash on empty input (#412).

--- 1.9.1
### Security
- Limit decompressed input size.
--- 3.0.0 (missing): 0 lines

In CI, fail the release if the extracted notes are empty: it means somebody forgot to write (or generate) the changelog entry. The release workflow passes this file to gh release create --notes-file.

Generated, then edited

Generators (git-cliff, semantic-release, changesets, release-please) are excellent at the boring 90%: collecting, grouping, linking. They can't know that "refactor the cache" made startup twice as fast, or that a fix changes behaviour someone relied on. A good process is:

  1. commits and PR titles written for humans (Conventional Commits);
  2. the generator writes the section;
  3. a person reads it before the release, adds highlights and upgrade instructions, and removes noise.

Tools that open a "release PR" (release-please, changesets' version PR) make step 3 natural: the generated changelog is a diff you review and edit before merging. Fully automatic tools (semantic-release) skip it, which is why their quality depends entirely on commit messages.

Test yourself

What is the purpose of the [Unreleased] section?

  1. To list rejected features
  2. To collect changes as they land, so a release only renames it to the new version
  3. To hide changes from users
  4. It is required by Git

Which entry is most useful in a changelog?

  1. refactor: move code into utils
  2. **Breaking:** --legacy was removed; use --format=v1 instead
  3. chore: bump CI image
  4. fix: address review comments

Why should the release job fail when the extracted notes are empty?

  1. GitHub rejects empty releases
  2. It signals a missing changelog entry for the version being released
  3. awk failed
  4. Empty notes break the checksum