Skip to content

scripts: unreleased changes as one file each under changelog.d - #214

Merged
linyiru merged 1 commit into
mainfrom
changelog-fragments
Nov 8, 2026
Merged

linyiru merged 1 commit into
mainfrom
changelog-fragments

Conversation

@linyiru

@linyiru linyiru commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Every PR with a user-visible change appended a line under ## [Unreleased] in CHANGELOG.md. PRs open at the same time therefore conflicted on the same lines, and each one needed a hand merge after the previous one landed. Three of the last six PRs did.

Each change now adds its own file under changelog.d/, so parallel PRs never touch the same lines. The format is described in changelog.d/README.md.

scripts/changelog.py does three things:

  • check validates every fragment: known Keep a Changelog section, entries starting with - , and file:line in each error. make check runs it.
  • show [--json] prints everything unreleased, merged by section: what is still in CHANGELOG.md plus the fragments.
  • release VERSION [DATE] folds all of it into ## [VERSION] - DATE, updates the compare links and deletes the fragments. It refuses a version that is already released.

The lines already under Unreleased stay where they are, and the release folds them in too, so open PRs that edit CHANGELOG.md keep working.

AGENTS.md now states the rule. Tests are in scripts/test-changelog.sh.

Every PR with a user-visible change appended under "## [Unreleased]" in CHANGELOG.md, so PRs open at the same time conflicted on the same lines and each needed a hand merge after the one before it landed; three of the last six did. Each change now adds its own file under changelog.d/. scripts/changelog.py checks the files (make check runs it), shows everything unreleased, merged by section and as JSON, and at release folds them and any lines still under Unreleased into a new version, updates the compare links and deletes the files.

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
@linyiru
linyiru enabled auto-merge November 8, 2026 03:22
@linyiru
linyiru merged commit 82547a3 into main Nov 8, 2026
7 checks passed
@linyiru
linyiru deleted the changelog-fragments branch November 8, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant