Skip to content

[BUG] prepare-release PR-body extraction truncates at inline '## [' in changelog bullets #620

Closed

Description

@c-vigo

Description

The "Extract CHANGELOG content for PR body" step in prepare-release truncates
the release PR body when a ## [X.Y.Z] version entry contains the literal text
## [ anywhere in its bullets (e.g. a changelog entry that quotes a heading like
`## [X.Y.Z] - TBD`). Everything after that inline match is dropped from the
PR body.

Observed (0.3.8)

The release PR (#619) body rendered only the first changelog bullet:

## [0.3.8] - TBD

### Fixed

- **Prevent prepare-release from branching ... (#617)**

— omitting the rest of #617 and the entire #612 entry. The CHANGELOG on
release/0.3.8 is correct; only the extracted PR body is truncated.

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 text inside a
bullet. The range therefore closes early and the tail of the section is lost.

Proposed fix

Anchor both range patterns to the start of line so only real column-0 version
headings delimit the section:

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

Apply to both copies (identical step):

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

Refs

Surfaced on the 0.3.8 release PR (#619). Latent bug, exposed by changelog entries
for #617/#612 that quote ## [X.Y.Z] headings.

Activity

  1. c-vigo commented on Jun 22, 2026

    @c-vigo
    ContributorAuthor

    Fixed via #621 and shipped in 0.3.8. The PR-body changelog extraction now anchors its sed range to start-of-line headings, so inline backtick-quoted ## [X.Y.Z] text no longer truncates the body. Confirmed on PR #619's refreshed body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions