fix(github): truncate release body exceeding GitHub 125k char limit#754
Merged
fix(github): truncate release body exceeding GitHub 125k char limit#754
Conversation
When a CHANGELOG entry exceeds GitHub's 125,000-character release body limit, the API call fails with a 422 error. This happened during the Sentry 26.2.0 release. The release body is now truncated at a line boundary when it exceeds the limit, and a footer is appended linking to the full changelog via a permalink (using the commit SHA and line positions in the CHANGELOG file). Changes: - Add optional startLine/endLine to Changeset interface - Compute line numbers in extractChangeset from character positions - Add GITHUB_RELEASE_BODY_MAX constant (125,000) - Add truncateBody and buildChangelogPermalink helpers to GitHubTarget - Refactor createDraftRelease to explicitly pass name/body instead of spreading the full Changeset object into the API call
hubertdeng123
approved these changes
Feb 17, 2026
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.
Summary
Fixes the Sentry 26.2.0 release failure where the CHANGELOG body exceeded GitHub's 125,000-character release body limit, causing a 422 API error (failed run).
Changesetinterface gains optionalstartLine/endLinefields so the permalink can anchor directly to the relevant section inCHANGELOG.mdcreateDraftReleasenow explicitly passesnameandbodyto the API instead of spreading the fullChangesetobject, preventing extra fields from leaking into the requestExample truncation footer