Skip to content

fix(release): correct changelog extraction regex#13214

Merged
ilhan007 merged 1 commit intomainfrom
fix/changelog-extraction-regex
Mar 7, 2026
Merged

fix(release): correct changelog extraction regex#13214
ilhan007 merged 1 commit intomainfrom
fix/changelog-extraction-regex

Conversation

@ilhan007
Copy link
Contributor

@ilhan007 ilhan007 commented Mar 7, 2026

Summary

  • Fixes the regex in extractChangelog.mjs that caused all 2.20.x GitHub releases to have empty release notes
  • The m (multiline) flag makes $ match end of every line; combined with the lazy ([\s\S]*?) capture group, the lookahead (?=^# \[|$) immediately matches at the next end-of-line, returning an empty string every time
  • Changed lookahead to (?=\n# \[|$(?!\n)) so $ only matches the true end of string

Test plan

  • Verify the regex correctly extracts changelog sections by running a test against CHANGELOG.md
  • Trigger a release and confirm the GitHub release body is populated

The multiline flag causes $ to match end of every line, making
the lazy capture group always return empty. This resulted in all
2.20.x GitHub releases having empty release notes.

Change the lookahead from (?=^# \[|$) to (?=\n# \[|$(?!\n)) so
$ only matches the true end of string, not end of each line.
@ilhan007 ilhan007 merged commit 1500ada into main Mar 7, 2026
12 checks passed
@ilhan007 ilhan007 deleted the fix/changelog-extraction-regex branch March 7, 2026 06:39
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