Skip to content

fix(core): truncate release notes over GitHub's release body limit - #2551

Open
akshatshahh wants to merge 1 commit into
intuit:mainfrom
akshatshahh:fix/2418-cap-release-notes-length
Open

akshatshahh wants to merge 1 commit into
intuit:mainfrom
akshatshahh:fix/2418-cap-release-notes-length

Conversation

@akshatshahh

Copy link
Copy Markdown

What Changed

Git.publish in packages/core/src/git.ts now 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 createRelease fails with a validation error, so the whole release fails. Capping the body in publish covers every caller, since all release creation goes through this method.

Tests: git.test.ts passes 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 the baz test plugin is not built; the same 2 unrelated tests fail on main).

Todo:

  • Add tests
  • Add docs

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major

Disclosure: this change was drafted with AI assistance; I reviewed the diff and ran the tests myself.

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

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.

Release process fails if release notes created by auto grow too big

1 participant