diff --git a/tools/prepare_release_notes.py b/tools/prepare_release_notes.py index fcff9c4ddc..ed4c2e5562 100644 --- a/tools/prepare_release_notes.py +++ b/tools/prepare_release_notes.py @@ -3,14 +3,12 @@ import json import re from pathlib import Path -# GitHub's release body limit is measured in characters. BODY_LIMIT = 125000 def release_body(notes): if len(notes) <= BODY_LIMIT: return notes - # Keep the next section and the changelog link, even without contributors. return re.sub( r"^## What's Changed[^\S\r\n]*\r?\n.*?(?=^#{1,2} |^\*\*Full Changelog\*\*:|\Z)", "", @@ -26,7 +24,6 @@ def prepare_notes(source, body, full): raise ValueError("Generated release notes body must be a string") full.parent.mkdir(parents=True, exist_ok=True) full.write_text(notes, encoding="utf-8", newline="") - # Do not shorten anything else: GitHub should reject an oversized remainder. body.write_text(release_body(notes), encoding="utf-8", newline="")