Skip to content

ci: validate changelog fragment filenames#5212

Open
MikeGoldsmith wants to merge 2 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/changelog-fragment-validation
Open

ci: validate changelog fragment filenames#5212
MikeGoldsmith wants to merge 2 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/changelog-fragment-validation

Conversation

@MikeGoldsmith
Copy link
Copy Markdown
Member

Summary

Adds a CI step that validates each newly added changelog fragment's basename against <PR_NUMBER>.<type> (where <type>added | changed | deprecated | removed | fixed). Catches two failure modes that towncrier check doesn't:

Both currently slip through because towncrier check only verifies that a fragment was added, not what it's called.

Also adds a one-line note to the do-not-edit comment in the root CHANGELOG.md flagging that the existing static ## Unreleased entries pre-date towncrier and need folding into the first towncrier-generated release manually — towncrier build inserts new release blocks above that section rather than merging into it.

Same fixes ported back from opentelemetry-python-genai PR open-telemetry/opentelemetry-python-genai#16 where they were originally caught.

Test plan

  • CI runs the new step on this PR (which has the Skip Changelog label, so the workflow as a whole skips — verification of the validation itself is via a follow-up PR that intentionally adds a bad fragment, or by inspection of the workflow logic)
  • Confirm towncrier check still gates on fragment existence

Add a workflow step that rejects fragments whose basename doesn't match
<PR_NUMBER>.<type> (where type is one of added, changed, deprecated,
removed, fixed). This catches typos in either the PR number or the
fragment type before they produce a misleading PR link in the rendered
changelog. towncrier check verifies a fragment exists; it doesn't
enforce naming.

Also note in the do-not-edit comment of the root CHANGELOG.md that the
existing static "## Unreleased" entries must be folded into the first
towncrier-built release manually — towncrier inserts new release blocks
above that section without merging.

Assisted-by: Claude Opus 4.7 (1M context)
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner May 15, 2026 08:50
@MikeGoldsmith MikeGoldsmith added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 15, 2026
@MikeGoldsmith MikeGoldsmith moved this to Ready for review in Python PR digest May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

1 participant