Repository navigation
ci: every PR records its changelog entry under [Unreleased], and CI checks it - #197
Merged
Merged
Conversation
…hecks it Co-Authored-By: Claude Opus 5.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.
The changelog is now written in each PR and checked by CI, the way Grafana Mimir does it. Until now, entries were written at release time from memory: nine PRs merged between 3.0.0 and this one, and none of them added an entry.
The rule
## [Unreleased]inCHANGELOG.md, in the Keep a Changelog heading that fits, ending with its number, for example(#193).Internalstays for release and build machinery, as before.changelog-not-neededlabel instead..github/workflows/changelog.ymlrunsscripts/changelog-has-entry.shand fails the PR when neither is true. It is its own workflow, so adding or removing the label re-runs only this short check, not the integration suite. The parentheses in(#N)keep#19from matching an entry for#193.scripts/changelog-missing.sh <previous-tag>lists merged PRs that have neither an entry nor the label, and it must print nothing before a tag. The release then renames## [Unreleased]to the version.scripts/next-pr-number.shpredicts it, so the entry can go in before the PR exists.The rules are in
docs/release-process.md, section Changelog, which replaces the old "Auto-CHANGELOG" section.CONTRIBUTING.md, the PR rules inCLAUDE.md, and the CI shape indocs/testing.mdpoint to it.Why the Mimir model
Grafana Labs uses four models, checked against their repositories on 2026-10-10:
CHANGELOG.md, unless it haschangelog-not-neededGeneration from titles is the most common model across the org. It does not fit uapi, because
docs/versioning.mdrequires some entries to carry more than a title can: a carve-out entry must say which carve-out it uses and how loudly the change fails. Mimir keeps the prose and adds the enforcement. Mimir added that check in June 2025, while grafana/grafana dropped its own in May 2026. Keep a Changelog headings stay as they are, since the file,scripts/release-notes.shand the semver mapping already use them.Backfill
## [Unreleased]now holds entries for #186, #189, #190, #193, #194, #195 and #196. #187 and #188 changed only docs, so they now carrychangelog-not-needed.scripts/changelog-missing.sh v3.0.0printed all nine before the backfill and prints nothing after it. This PR carries the label too: it changes no artifact.Does this change the wire surface?
No. Nothing in the package changes. The changelog text changes, and it becomes the body of the next GitHub Release.
Was it verified against a real device, or only by CI?
Neither applies to the router, because nothing on it changes. The scripts ran against this repository and its real PR history:
changelog-has-entry.shfound each backfilled entry, rejected#19and#187, andchangelog-missing.sh v3.0.0behaved as stated above. The workflow itself was tested on this PR:changelogrun failed withCHANGELOG.md has no entry ending in (#197) under ## [Unreleased].Was LuCI checked?
Not applicable: this is a repository process, not a router behavior.
Branch protection
mainhas no branch protection, so GitHub does not require this check, or any other. Merging only on green is what enforces it today. A ruleset that requireschangelog / entryand the CI jobs would make the rule hold without that discipline.🤖 Generated with Claude Code