Skip to content

Release PR lists only unreleased commits and stays under the body limit - #80

Open
tino097 wants to merge 3 commits into
mainfrom
tino097/release-pr-unreleased-range
Open

tino097 wants to merge 3 commits into
mainfrom
tino097/release-pr-unreleased-range

Conversation

@tino097

@tino097 tino097 commented Nov 16, 2026

Copy link
Copy Markdown
Member

The cowork release PR run failed with Body is too long (maximum is 65536 characters). Release PRs are squash merged, so main..staging keeps every commit ever released and grew to 852 commits.

What changed

  • List only commits not yet released in the release PR: the range now excludes the head of the last merged staging -> main PR, with a fallback to the old range when there is none.
  • Cap the release PR commit list so the body stays under the GitHub limit: at most 250 lines, with an overflow line and a compare link.
  • Bound the release PR body by characters and count only listed commits: a 50,000 character budget on the list, merge commits left out of the count, the looked-up SHA validated, and fork PRs ignored.

Checks

  • Dry run of both steps against cowork with gh writes stubbed: 1 commit, 600 character body (was 852 commits, over 65,536).
  • Fallback path with 792 commits: list cut to 250, 23,134 character body.
  • shellcheck on both steps, pytest tests/ (298 passed, 15 skipped), workflow_graph.py: passed.

🤖 Generated with Claude Code

tino097 and others added 3 commits November 16, 2026 14:03
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tino097
tino097 requested a review from a team November 16, 2026 13:16
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.

1 participant