Skip to content

Commit b2b2506

Browse files
NookieAIclaude
andcommitted
CI: fix changelog extraction regex to match ## Version / ## [X.Y.Z] headings
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 41ac878 commit b2b2506

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import re, sys
3939
ver = sys.argv[1]
4040
try:
4141
cl = open('CHANGELOG.md', encoding='utf-8').read()
42-
m = re.search(r'## Version ' + re.escape(ver) + r'\b(.*?)(?=\n## |\Z)', cl, re.DOTALL)
42+
m = re.search(r'^##\s*(?:Version\s+)?\[?v?' + re.escape(ver) + r'\]?\b.*?\n(.*?)(?=\n##\s|\Z)', cl, re.DOTALL | re.MULTILINE)
4343
print((m.group(1).strip()[:3000] if m else '').rstrip())
4444
except Exception as e:
4545
sys.stderr.write(str(e) + '\n')

0 commit comments

Comments
 (0)