Repository navigation
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
Open
colbymchenry wants to merge 1 commit into
colbymchenry wants to merge 1 commit into
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub refuses a release body over 125,000 characters (HTTP 422). The Release workflow pushes the promoted CHANGELOG to
mainbefore 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.mjsnow keeps the body within 120,000 UTF-8 bytes (never less than GitHub's character count):…and N more entries: the full list is in CHANGELOG.md, linked at the release's tag (atmainfor 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
mainis frozen for it.🤖 Generated with Claude Code