Carry the reason for a release from the pull request that made it - #20
Merged
Conversation
Generated notes list what changed; they cannot say what any of it was for. That part was hand-written onto the release page after the fact, which lasts exactly as long as someone keeps doing it, and is reconstructed from a diff rather than remembered. CHANGELOG.md holds one entry per version, written in the pull request that makes the change, and the release carries it. A candidate and the release it is promoted to resolve to the same entry, so 0.4.0-rc.1, 0.4.0-rc.2 and 0.4.0 all ship the same explanation without anyone re-typing it. Publishing a version with no entry fails in the first job, seconds in, rather than twenty minutes later at the publish step, because a release with nothing to say about itself should be cheap to catch. The extractor is a small script with its own self-test rather than text handling inside the workflow: a candidate reading its release's entry, an entry running to the end of the file, and a missing entry being reported rather than guessed at are all worth asserting where they can be run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #19, which GitHub closed when its base branch (#18) was merged and deleted. Same commit, now based on
main.Generated notes list what changed. They cannot say what any of it was for. That part was hand-written onto the release page after the fact, which lasts exactly as long as someone keeps doing it — and is reconstructed from a diff rather than remembered.
How it works
CHANGELOG.mdholds one entry per version, written in the pull request that makes the change:A candidate and the release it is promoted to resolve to the same entry:
0.4.0-rc.1,0.4.0-rc.2and0.4.0all read## 0.4.0. So the explanation written once is carried by every build that ships it, with nothing re-typed into a release page.The published release then reads: the entry, then install instructions naming the real artifacts, then the pull requests merged since the last full release.
Failing early
Publishing a version with no entry fails in
detect-changes— seconds in — rather than at the publish step twenty minutes of building later:Why a script rather than text handling in the workflow
tools/release_notes.pycarries its own self-test, which the release gate runs. The behaviours worth asserting are exactly the ones that are awkward to eyeball inside PowerShell: a candidate reading its release's entry, an entry running to the end of the file, the next entry not leaking into this one, and a missing entry being reported rather than guessed at.Verification
release notes extractor: ALL PASS, wired into the release quality gateCHANGELOG.mdforv0.4.0-rc.1; a missing version exits 1 with an actionable messagev0.4.0: entry, install steps, generated changelogALL PASSunderTZ=UTC; workflow parsesCHANGELOG.mdadded to the trigger paths, since it decides what a release saysCHANGELOG.mdis seeded with the0.4.0entry, so promotingv0.4.0-rc.1will carry the same explanation the candidate's notes have now — without anyone editing a release page.🤖 Generated with Claude Code