Skip to content

fix(github): truncate release body exceeding GitHub 125k char limit#754

Merged
BYK merged 1 commit intomasterfrom
fix/github-release-body-truncation
Feb 17, 2026
Merged

fix(github): truncate release body exceeding GitHub 125k char limit#754
BYK merged 1 commit intomasterfrom
fix/github-release-body-truncation

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 17, 2026

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).

  • When the release body exceeds 125k chars, it is now truncated at a line boundary and a footer is appended linking to the full changelog via a permalink using the commit SHA and line positions
  • The Changeset interface gains optional startLine/endLine fields so the permalink can anchor directly to the relevant section in CHANGELOG.md
  • createDraftRelease now explicitly passes name and body to the API instead of spreading the full Changeset object, preventing extra fields from leaking into the request

Example truncation footer

---
_This changelog has been truncated. See the [full changelog](https://github.com/getsentry/sentry/blob/abc123/CHANGELOG.md#L3-L500) for all changes._

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
@BYK BYK enabled auto-merge (squash) February 17, 2026 20:49
@BYK BYK merged commit 9a7d6e5 into master Feb 17, 2026
17 checks passed
@BYK BYK deleted the fix/github-release-body-truncation branch February 17, 2026 20:52
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.

2 participants