Skip to content

fix(ci): anchor changelog PR-body extraction to line-start headings - #621

Merged
c-vigo merged 1 commit into
release/0.3.8from
bugfix/620-changelog-extract-anchor
Jun 22, 2026
Merged

c-vigo merged 1 commit into
release/0.3.8from
bugfix/620-changelog-extract-anchor

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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 that
quotes `## [X.Y.Z] - TBD`).

Targeted at release/0.3.8 so 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 line
containing ## [ anywhere — including inline backtick-quoted headings inside
bullets — closing the range early and dropping the rest of the section.

Change

Anchor both range patterns to start-of-line:

sed -n "/^## \[$VERSION\]/,/^## \[/p" CHANGELOG.md | sed '$d'

Applied to both copies:

  • .github/workflows/prepare-release.yml
  • assets/workspace/.github/workflows/prepare-release.yml

Testing

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

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
@c-vigo
c-vigo merged commit 5ea4187 into release/0.3.8 Jun 22, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/620-changelog-extract-anchor branch June 22, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant