Skip to content

fix(release): notes too long for a GitHub release are cut with a link to the CHANGELOG - #3306

Open
colbymchenry wants to merge 1 commit into
mainfrom
fix/release-notes-size
Open

colbymchenry wants to merge 1 commit into
mainfrom
fix/release-notes-size

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

GitHub refuses a release body over 125,000 characters (HTTP 422). The Release workflow pushes the promoted CHANGELOG to main before it creates the GitHub release, so an oversized block would stop a release halfway: CHANGELOG moved, no GitHub release, nothing on npm. 1.6.3's [Unreleased] block extracts to 301,030 characters today (1.6.2's was 76,281).

scripts/extract-release-notes.mjs now keeps the body within 120,000 UTF-8 bytes (never less than GitHub's character count):

  • it cuts before the first entry or heading that doesn't fit, never inside a code fence, so no entry shows in part;
  • a heading the cut leaves empty is dropped;
  • the body ends with …and N more entries: the full list is in CHANGELOG.md, linked at the release's tag (at main for an [Unreleased] block).

Notes under the cap are unchanged: all 33 releases in the CHANGELOG extract byte for byte as before. On today's [Unreleased] the output is 119,756 bytes with 248 entries left for the link.

This is the safety net. The 1.6.3 notes themselves are being condensed in a separate PR so the whole release fits on the page.

Tests: __tests__/extract-release-notes.test.ts, 4 tests. 3 fail on the old script (no cut, no pointer) and all 4 pass with this change. AGENTS.md gains changelog rule 7: keep a release's block well under the limit.

Not merged until the 1.6.3 comparison against 1.6.2 finishes, since main is frozen for it.

🤖 Generated with Claude Code

… to the CHANGELOG

GitHub refuses a release body over 125,000 characters with HTTP 422. The
Release workflow pushes the promoted CHANGELOG to main before it creates
the GitHub release, so an oversized block would stop a release halfway:
the CHANGELOG moved, but no release and nothing on npm. 1.6.3's
[Unreleased] block extracts to 301,030 characters (1.6.2's was 76,281).

extract-release-notes.mjs now keeps the body within 120,000 UTF-8 bytes,
which is never less than GitHub's character count. It cuts before the
first entry or heading that doesn't fit, outside any code fence, drops a
heading the cut leaves empty, and ends with "…and N more entries: the
full list is in CHANGELOG.md", linked at the release's tag (at main for
an Unreleased block).

Notes under the cap are unchanged: all 33 releases in the CHANGELOG
extract byte for byte as before. On today's [Unreleased] block the
output is 119,756 bytes, with 248 entries left for the link.

Tests: __tests__/extract-release-notes.test.ts, 4 tests. 3 fail on the
old script (no cut, no pointer); all 4 pass now. AGENTS.md gains rule 7:
keep a release's block well under the limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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