Skip to content

fix(release): extract release notes with the composed tag heading - #1359

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1355-prefixed-release-notes-extraction
Aug 7, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1355-prefixed-release-notes-extraction

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

In a consumer with a tag prefix, the release pipeline wrote one changelog heading and read back another: release-core.yml finalizes with prepare-changelog finalize … --tag-prefix "$TAG_PREFIX", composing the prefix into the heading (## [v1.0.0](…/releases/tag/v1.0.0) - …), while release-publish.yml extracted 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 body No 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_prefix input (#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 on release_kind == 'final'), so its heading is still the unprefixed ## [X.Y.Z] - TBD that prepare wrote. 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 bespoke release.yml extractions have no tag-prefix surface at all. Nothing else changed.

Test plan

  • New test_release_notes_extraction_reads_the_heading_on_disk in tests/test_release_tag_prefix.py, parametrized tag_prefix ∈ {"", "v"} × writer state {final, candidate}: executes the real run: 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.
  • Full release-workflow pytest set (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-files green (verified independently by reviewer).

Refs: #1355

@c-vigo
c-vigo merged commit 4938eec into dev Aug 7, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1355-prefixed-release-notes-extraction branch August 7, 2026 10:38
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