Skip to content

ci: replace CHANGELOG.md edits with towncrier changelog fragments - #96

Merged
Toldry merged 1 commit into
masterfrom
claude/project-thread-8umg9f
Oct 16, 2026
Merged

Toldry merged 1 commit into
masterfrom
claude/project-thread-8umg9f

Conversation

@Toldry

@Toldry Toldry commented Oct 16, 2026

Copy link
Copy Markdown
Owner

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.md and 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:

  • Adds towncrier (dev group) and a [tool.towncrier] config in pyproject.toml with Keep a Changelog's six types and the existing ## [X.Y.Z] - date heading format. CHANGELOG.md's ## [Unreleased] heading becomes the <!-- towncrier release notes start --> marker.
  • Release job: gets the next version from bump-my-version show, runs towncrier build --version, then bump-my-version bump --allow-dirty so the release commit includes the compiled changelog and the deleted fragments. .bumpversion.toml no longer edits CHANGELOG.md. I ran this sequence in a scratch worktree, and it produced one release commit plus the tag.
  • scripts/release_level.py now prints none when changelog.d/ holds no fragments, instead of checking the Unreleased section.
  • New tests/unit/test_changelog_fragments.py runs a towncrier draft build, so a misspelled fragment type fails pytest before merge instead of failing the release job after it.
  • Docs: changelog.d/README.md (naming and format), a new CONTRIBUTING.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

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
@Toldry Toldry self-assigned this Oct 16, 2026
@Toldry
Toldry merged commit 1628610 into master Oct 16, 2026
4 checks passed
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.

2 participants