refactor(ci): Improve release notes cleaning process for manual release

This commit is contained in:
Inhishonor
2026-04-14 17:08:41 -07:00
parent c141cd5dce
commit 2edb91c417
+8 -6
View File
@@ -124,15 +124,17 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
python3 <<'PY' python3 <<'PY'
import os, re, pathlib import os, re, pathlib
notes = os.environ.get("NOTES", "") notes = os.environ.get("NOTES", "")
clean = re.sub(
r'(?im)^\s*by\s+\S+\s+in\s+.*$', cleanPrTitles = re.sub(r'(?im)\s+by\s+@?\S+\s+in\s+https?://\S+', '', notes)
'', cleanNewContributors = re.sub(r'(?is)##\s+New\s+Contributors.*', '', cleanPrTitles).strip()
re.sub(r'(?im)^\s*["\']?\*\*Full\s+Changelog\*\*\s*:\s*.*$', '', notes) # In case there isn't a 'New Contributors' line we should still remove the full changelog line after it
).rstrip() cleanTotalChangelog = re.sub(r'(?im)^\s*["\']?\*\*Full\s+Changelog\*\*\s*:\s*.*$', '', cleanNewContributors)
pathlib.Path("sanitized_notes.txt").write_text(clean) pathlib.Path("sanitized_notes.txt").write_text(cleanTotalChangelog)
PY PY
{ {
echo "clean_notes<<EOF" echo "clean_notes<<EOF"