fix(release): changelog extraction never worked — replace the lazy regex with a tested script (#135)#136
Merged
Merged
Conversation
…emptied every release body (#135)
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.
Why
Closes #135. Every GH release body since the extractor shipped has been silently empty — the inline lazy regex
([\s\S]*?)(?=\n## \[|$)under themflag let$match at the end of EVERY line, so the capture stopped at the blank line under the heading and returned "". The regex still matched, so the no-section fallback never fired either. Verified empty on v0.24.0 / v0.25.3 / v0.26.0 / v0.27.0.What
.github/scripts/extract-release-notes.cjs— committed, unit-testable script; index-slices from the version heading to the next^## [(or EOF); regex-escapes the version; keeps the explicit fallback message. CLI +module.exportsfor tests.auto-release.ymlcalls the script instead of the inline one-liner.test/extract-release-notes.test.mjs, including the auto-release: changelog extraction has never worked — every release body is empty ($ under the m flag ends the lazy capture at the first blank line) #135 regression pin (blank-line-under-heading) and a live check against the real CHANGELOG for 0.27.0.After merge I'll backfill the existing release bodies from their CHANGELOG sections.
Tests
Full suite 784 pass / 0 fail / 2 skip; script CLI verified against the real CHANGELOG (extracts the full 0.27.0 section).