Repository navigation
Gather release notes from change files, and rewrite the changelog by kind - #46
Merged
Merged
Conversation
A new Feature, Release notes: each branch writes a change file with a kind, a lead and at most a short paragraph; scripts/changelog.sh assembles them into the version's entry; the gate holds each file to its rules; a release is refused while changes/ holds one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A change file names a known kind, opens with a one-sentence lead of at most 160 characters, holds at most one paragraph of at most 80 words, and a breaking change ends with a migration note. CHANGELOG.md, now released history alone, is no longer read by the spelling guard; changes/README.md describes the format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/changelog.sh X.Y.Z [YYYY-MM-DD] writes the dated entry above every entry of CHANGELOG.md, one heading per kind, each change file a bullet that opens with its lead in bold, and removes the files. It refuses an empty changes/, a file of no known kind and a version the changelog already holds, changing nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release tag on a commit that still holds change files is refused, naming them and the script that gathers them; a prerelease leaves them for the release that follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each branch writes a change file under changes/; release step 1 runs scripts/changelog.sh, the release check refuses a commit that still holds one, prereleases write a short entry by hand, and a minor line needs no section of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each entry becomes a categorized change file under changes/, shortened to a lead and a paragraph; the library moves of the breaking change are listed in full in docs/migrating-to-3.0.md. CHANGELOG.md holds released entries alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each release from 2.0.0 to 2.4.4 lists its changes under Breaking, Security, Added, Changed and Fixed, each a bold one-sentence lead and at most a short paragraph; breaking changes carry a migration note and prerelease entries are cut to what they let people try. 1,532 lines become 796. Co-Authored-By: Claude Opus 5.5 <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.
Summary
CHANGELOG.mdwas the file every branch edited, which caused conflicts, and a hard-to-read wall of text. This PR replaces the hand-edited## Unreleasedsections with change files, and rewrites the changelog by kind.changes/<branch>.mdwith akind(breaking,security,added,changed,fixed), a lead of one sentence and at most a short paragraph. A breaking change ends with aMigration:note. Branches never editCHANGELOG.md. The format is inchanges/README.md.scripts/changelog.sh X.Y.Z [date]. At release step 1 it gathers the files into the dated entry, with one heading per kind and each bullet opening with its lead in bold, then deletes them. It refuses an emptychanges/, an unknown kind, or a version already in the changelog.release-check.shrefuses a release (not a prerelease) whose commit still holds change files.tests/guards/change_files.rsholds each file to the rules. The American-English guard now reads change files and skipsCHANGELOG.md, whose entries are all released.docs/migrating-to-3.0.md. Every released entry from 2.0.0 to 2.4.4 is rewritten under Breaking, Security, Added, Changed and Fixed. The file shrinks from 1,532 to 796 lines.## Unreleased in X.Y.0section.The contract change comes first, in
spec:: a new Feature, Release notes, and a refusal added to the release requirement.The GitHub release notes are extracted the same way as before (the workflow's awk stops at
##, not###). Release notes already published on GitHub keep their old text.Test plan
cargo fmt --check,cargo clippy --workspace --all-targets -D warningscargo nextest run --workspace. The one failure, a test that starteddate, is fixed in the script commit.loft fmt --check,loft check --fail-on warning,loft reconcile --fail-on warning🤖 Generated with Claude Code