Repository navigation
fix(release): extract release notes with the composed tag heading - #1359
Merged
Merged
Conversation
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.
Summary
In a consumer with a tag prefix, the release pipeline wrote one changelog heading and read back another:
release-core.ymlfinalizes withprepare-changelog finalize … --tag-prefix "$TAG_PREFIX", composing the prefix into the heading (## [v1.0.0](…/releases/tag/v1.0.0) - …), whilerelease-publish.ymlextracted the notes by matching## [$VERSION]on the bare semver — which can never land on a prefixed heading. It failed soft: the empty extraction hit the fallback and the release published with the literal bodyNo changelog notes found for X.Y.Z(tag and release object both correct, nothing red). Observed releasing vig-os/org-config v1.0.0; unprefixed repos were never affected.The extraction step now takes the already-threaded
tag_prefixinput (#1044) and accepts the composed tag## [${TAG_PREFIX}${VERSION}]alongside the bare form. Both are needed — the issue's prefix-only suggestion would have moved the bug rather than fixed it: a candidate publishes before the finalize step (gated onrelease_kind == 'final'), so its heading is still the unprefixed## [X.Y.Z] - TBDthatpreparewrote. With an empty prefix the two forms are the same string, so unprefixed repos see a byte-identical match.Other readers audited (grep over scaffold + devkit's own workflows for version-heading matches):
prepare-release.yml's PR-body sed runs pre-finalize (always bare, correct as-is); devkit's bespokerelease.ymlextractions have no tag-prefix surface at all. Nothing else changed.Test plan
test_release_notes_extraction_reads_the_heading_on_diskintests/test_release_tag_prefix.py, parametrizedtag_prefix ∈ {"", "v"}× writer state{final, candidate}: executes the realrun:block from the workflow YAML under bash against a synthetic CHANGELOG and asserts the notes are the bounded section body, not the fallback. RED before the fix on exactly the[final-v]case (fallback body published); the candidate cases are regression guards against the prefix-only fix.test_release_tag_prefix, tombstone, scaffold lint/drift, dist-gitignore, sync-dispatch, release-extension): 72/72 green.tests/bats/init-workspace.bats(renders + actionlints the scaffold): 280/280 green.prek run --all-filesgreen (verified independently by reviewer).Refs: #1355