From 2edb91c417ef85875e5f6358f2fe318d682f30b6 Mon Sep 17 00:00:00 2001 From: Inhishonor Date: Tue, 14 Apr 2026 17:08:41 -0700 Subject: [PATCH] refactor(ci): Improve release notes cleaning process for manual release --- .github/workflows/manual-release.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 6cb86b75..5fb47a17 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -124,15 +124,17 @@ jobs: run: | set -euo pipefail python3 <<'PY' + import os, re, pathlib notes = os.environ.get("NOTES", "") - clean = re.sub( - r'(?im)^\s*by\s+\S+\s+in\s+.*$', - '', - re.sub(r'(?im)^\s*["\']?\*\*Full\s+Changelog\*\*\s*:\s*.*$', '', notes) - ).rstrip() + + 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() + # In case there isn't a 'New Contributors' line we should still remove the full changelog line after it + 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 { echo "clean_notes<