Repository navigation
ci: replace CHANGELOG.md edits with towncrier changelog fragments - #96
Merged
Merged
Conversation
Every PR added lines under `## [Unreleased]`, so merging one PR made all other open PRs conflict. PRs now add a file to changelog.d/, and the release job compiles the fragments into CHANGELOG.md with towncrier before bump-my-version commits and tags. A unit test runs a towncrier draft build so an unreadable fragment fails before merge. Also adds CONTRIBUTING.md, and drops the exact unit test count from AGENTS.md, which every PR changed too. Co-Authored-By: Toldry <toldry@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015VWw4WS57AYeuaHrvw7URU
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.
Requested by Querent · project thread
Before: every PR added its entry under
## [Unreleased]in CHANGELOG.md, so merging one PR made every other open PR conflict.After: a PR adds a new file such as
changelog.d/+my-fix.fixed.mdand never touches CHANGELOG.md. After a merge, the release job compiles the fragments into a dated CHANGELOG section and deletes them, so PRs can no longer conflict over the changelog.How:
towncrier(dev group) and a[tool.towncrier]config inpyproject.tomlwith Keep a Changelog's six types and the existing## [X.Y.Z] - dateheading format. CHANGELOG.md's## [Unreleased]heading becomes the<!-- towncrier release notes start -->marker.bump-my-version show, runstowncrier build --version, thenbump-my-version bump --allow-dirtyso the release commit includes the compiled changelog and the deleted fragments..bumpversion.tomlno longer edits CHANGELOG.md. I ran this sequence in a scratch worktree, and it produced one release commit plus the tag.scripts/release_level.pynow printsnonewhenchangelog.d/holds no fragments, instead of checking the Unreleased section.tests/unit/test_changelog_fragments.pyruns a towncrier draft build, so a misspelled fragment type failspytestbefore merge instead of failing the release job after it.changelog.d/README.md(naming and format), a newCONTRIBUTING.md, and updates to AGENTS.md (rule 5, the release section, the file table), README.md and docs/auto-deploy.md. AGENTS.md now says "1700+ unit tests" instead of an exact count, which every PR changed too.Open PRs that still edit
## [Unreleased]will conflict once more after this merges. The fix is to move their entry into a fragment.🤖 Generated with Claude Code
https://claude.ai/code/session_015VWw4WS57AYeuaHrvw7URU
Generated by Claude Code