Skip to content

fix(release): make changelog --update write the entries it compiles - #394

Merged
dan-petty merged 1 commit into
release/v0.2.22from
fix/changelog-update-writes-entries
Sep 22, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.22from
fix/changelog-update-writes-entries

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The command compiled the release notes, then discarded them. _build_changelog_section ran only when the version's section was empty; a section already holding one entry kept that entry and had its date refreshed. So devops release changelog --update printed "Updated CHANGELOG.md" while leaving the release unwritten, and v0.2.22 carried one line against fifty-two commits.

That matters beyond the file. Release descriptions are written from the changelog, so publishing v0.2.22 would have produced a release whose notes were a single unrelated roadmap entry.

--update now merges rather than replacing or skipping. Entries already in the file win, so a hand-edited description is not reverted by the next run, and comparison ignores trailing pull request references for the same reason deduplication does -- a squash merge and its original subject are one change. Re-running is idempotent: the section holds 56 entries after the first run and 56 after the second.

Also included is the compiled v0.2.22 entry itself, which is what the fix produces: 56 entries across Added, Fixed & Hardened, and Changed & Improved, with the one pre-existing line preserved exactly once.

The command compiled the release notes, then discarded them. `_build_changelog_section` ran only when the version's section was empty; a section already holding one entry kept that entry and had its date refreshed. So `devops release changelog --update` printed "Updated CHANGELOG.md" while leaving the release unwritten, and v0.2.22 carried one line against fifty-two commits.

That matters beyond the file. Release descriptions are written from the changelog, so publishing v0.2.22 would have produced a release whose notes were a single unrelated roadmap entry.

`--update` now merges rather than replacing or skipping. Entries already in the file win, so a hand-edited description is not reverted by the next run, and comparison ignores trailing pull request references for the same reason deduplication does -- a squash merge and its original subject are one change. Re-running is idempotent: the section holds 56 entries after the first run and 56 after the second.

Also included is the compiled v0.2.22 entry itself, which is what the fix produces: 56 entries across Added, Fixed & Hardened, and Changed & Improved, with the one pre-existing line preserved exactly once.
@dan-petty
dan-petty merged commit c4cd867 into release/v0.2.22 Sep 22, 2026
8 checks passed
@dan-petty
dan-petty deleted the fix/changelog-update-writes-entries branch September 22, 2026 18:04
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