build(release): Generate the changelog automatically with Craft - #1434
Open
runningcode wants to merge 1 commit into
Open
build(release): Generate the changelog automatically with Craft#1434runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
Craft has been configured with `changelogPolicy: auto` for years, but auto mode only generates a section when the "Unreleased" section is empty. Every PR hand-wrote its entry there (enforced by Danger), so generation never ran. Switch to the flow sentry-dart uses: the PR title is the changelog entry, and Craft categorizes it at release time. - Add .github/release.yml with categories matching the sections this changelog already uses, and `semver` fields so `craft prepare auto` can derive the bump. Renovate is excluded because it only bumps this repo's own build tooling. - Migrate .craft.yml off the deprecated `changelogPolicy` key and raise minVersion to the pinned action's version. Craft 2.21+ bumps versions from the publish targets when no `preReleaseCommand` is set, and the maven target cannot bump a Gradle build, so name scripts/bump-version.sh explicitly. - Stop the dependency updater from writing its own entries, and drop the stale "Unreleased" section. Either would keep that section non-empty and suppress generation for the next release. - Remove Danger. Its changelog rule fails any feat/fix PR without a manual entry and cannot be disabled on its own.
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
September 2, 2026 14:42
0xadam-brown
approved these changes
Sep 7, 2026
0xadam-brown
left a comment
Member
There was a problem hiding this comment.
Lgtm 👍
My clanker pointed out that the following from renovate.json has now gone stale and can be removed:
{
"description": "Deps bundled into the published plugin are user-facing, so use a fix: title to make Danger require a CHANGELOG entry. Everything else stays build(deps): and is skipped.",
"matchPackageNames": [
"org.ow2.asm:asm-util",
"org.ow2.asm:asm-commons"
],
"semanticCommitType": "fix"
}
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.
📜 Description
Craft has been configured with
changelogPolicy: autofor years, but auto mode only generates a section when the## Unreleasedsection is empty. Every PR hand-wrote its entry there (enforced by Danger), so the generation path never actually ran.This switches us to the flow sentry-dart uses: the PR title is the changelog entry, and Craft categorizes it at release time.
.github/release.yml(new) — categories matching the sections this changelog already uses (Breaking Changes / Security / Features / Fixes / Performance / Dependencies / Internal Changes), each with asemverfield socraft prepare autocan derive the version bump. Renovate and Dependabot are excluded, since Renovate only bumps this repo's own build tooling; the bumps users care about (CLI, Android SDK, ComposablePreviewScanner) come fromgetsentry/github-workflows/updaterasgithub-actions[bot]and land under Dependencies..craft.yml— migrate off the deprecatedchangelogPolicykey tochangelog.policy, and raiseminVersionto2.30.1, which is exactly the craft SHA both workflows already pin. Craft 2.21+ bumps versions from the publish targets when nopreReleaseCommandis set, and themaventarget can't bump a Gradle build, soscripts/bump-version.shis now named explicitly rather than relied on as a default.update-deps.yml—changelog-entry: falseon all three updaters, andCHANGELOG.md— drop the stale## Unreleasedsection. Either one left in place keeps that section non-empty and silently suppresses generation for the next release. Those four entries are regenerated from their PR titles.danger.yml— removed. Its changelog rule hard-fails anyfeat:/fix:/perf:/security:PR without a manual entry, and the shared action has no input to disable that one check.💡 Motivation and Context
Hand-written entries are a recurring source of merge conflicts, rebase fixups (
docs(changelog): Add missing entry…,chore(changelog): …), and PRs that get blocked on a one-line edit.💚 How did you test it?
Replayed the last 60 merged PRs through Craft's own categorization logic with this config. Sample of the generated output:
20 of the 60 were excluded (all Renovate), and 2 landed in Craft's catch-all
Othersection because their titles had no conventional-commit prefix — nothing is dropped silently.Also verified against craft's source at the pinned SHA
cd1e829that it is exactly2.30.1, that its schema accepts thechangelogobject form, and thatpreReleaseCommandstill routes toscripts/bump-version.sh.📝 Checklist
🔮 Next steps
actionlintif we want that enforced.build(verification):commits. Applying the existingSecuritylabel to them puts them back — label matching takes precedence over the title pattern.