Repository navigation
fix(ci): anchor changelog PR-body extraction to line-start headings - #621
Merged
Merged
Conversation
The 'Extract CHANGELOG content for PR body' step used an unanchored sed range (/## \[/), so an inline backtick-quoted heading inside a bullet (e.g. `## [X.Y.Z] - TBD`) ended the range early and truncated the release PR body. Anchor both range patterns to start-of-line (/^## \[/) so only real column-0 version headings delimit the section. Applied to this repo's workflow and the synced assets/workspace template. Refs: #620
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
Fixes a latent bug in
prepare-release's "Extract CHANGELOG content for PR body"step that truncated the release PR body (observed on #619) when a
## [X.Y.Z]section contains the literal
## [inside a bullet (e.g. a changelog entry thatquotes
`## [X.Y.Z] - TBD`).Targeted at
release/0.3.8so it ships with this release.Type of Change
ci-- CI/CD pipeline changes (fix)Root cause
CHANGELOG_CONTENT=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d')The range-end pattern
/## \[/is unanchored, so it matches the first linecontaining
## [anywhere — including inline backtick-quoted headings insidebullets — closing the range early and dropping the rest of the section.
Change
Anchor both range patterns to start-of-line:
Applied to both copies:
.github/workflows/prepare-release.ymlassets/workspace/.github/workflows/prepare-release.ymlTesting
pre-commit runpasses.release/0.3.8CHANGELOG: the old pattern stops afterthe first [BUG] prepare-release can branch release/X.Y.Z at pre-freeze dev SHA (read-after-write race) #617 bullet; the anchored pattern extracts the full
[0.3.8]section(both [BUG] prepare-release can branch release/X.Y.Z at pre-freeze dev SHA (read-after-write race) #617 and [BUG] Smoke-test dispatch not idempotent across candidate→final on same base version #612), ending at the blank line before
## [0.3.7].Notes
The release→main→dev sync will carry this back to
dev; no separate dev PR needed.PR #619's body was already corrected manually.
Refs: #620