Repository navigation
fix(core): truncate release notes over GitHub's release body limit - #2551
Open
akshatshahh wants to merge 1 commit into
Open
akshatshahh wants to merge 1 commit into
akshatshahh wants to merge 1 commit into
Conversation
GitHub rejects release bodies longer than 125,000 characters, which failed release creation for releases with large changelogs. Cap the body in Git.publish, appending a note that points to the CHANGELOG for the full notes.
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.
What Changed
Git.publishinpackages/core/src/git.tsnow caps the release notes body at GitHub's 125,000 character limit for a release body. If the generated notes are longer, they are truncated to fit and a short note is appended saying the notes were truncated and pointing to the CHANGELOG for the full list. Notes under the limit are sent unchanged.Added two tests in
packages/core/src/__tests__/git.test.ts: one asserting an oversized body is capped at exactly 125,000 characters with the truncation note, and one asserting an under-limit body passes through untouched.Why
Fixes #2418. When a release accumulates many changes, the generated release notes exceed GitHub's 125,000 character API limit and
createReleasefails with a validation error, so the whole release fails. Capping the body inpublishcovers every caller, since all release creation goes through this method.Tests:
git.test.tspasses 57/57, including the 2 new tests. The wider core suite shows the same pre-existing failures with and without this change (19 suites fail to load in this environment because thebaztest plugin is not built; the same 2 unrelated tests fail onmain).Todo:
Change Type
Indicate the type of change your pull request is:
documentationpatchminormajorDisclosure: this change was drafted with AI assistance; I reviewed the diff and ran the tests myself.