Skip to content

build: list each change once in the version PR's description - #2412

Merged
fforootd merged 1 commit into
mainfrom
claude/version-pr-change-list
Oct 27, 2026
Merged

fforootd merged 1 commit into
mainfrom
claude/version-pr-change-list

Conversation

@fforootd

@fforootd fforootd commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

  • changesets/action writes the version PR's description as a heading for each bumped package, followed by that package's changelog section. Each change therefore repeats under every package it ships in. For 0.2.0 the full description would be about 102,000 characters. That's over the action's 60,000-character cap, so the action dropped every section. As a result, build: version packages #2226 lists 24 package names and no changes, and five of those names are the @zitadel/server-<os>-<arch> binaries.
  • After the action opens or updates the PR, release-publish now replaces the description with the output of node scripts/release-github.mjs version-pr-body. That's the change list the GitHub Release uses: each change appears once, with the packages it ships in, and the platform packages are left out. A two-line intro says what merging does.
  • If the list goes over GitHub's 65,536-character limit for a pull request body, changes are omitted the way the release body omits them: patch changes before minor ones, the longest first, and never a breaking change. A line then points at the CHANGELOG.md files in the diff. To support this, the omission loop moved out of fitGeneratedReleaseFacts into a shared fitChanges, and writeReleaseMetadata's package loop became readReleasePackages, which both paths now use.
  • The release runbook's review step now says what the description holds.

Validation

  • node_modules/.bin/vitest run scripts/release-github.test.mjs: 20 passed. The 3 new tests cover each change listed once without the platform packages, omission under the limit, and a too-long breaking change failing instead of being dropped.
  • (cd apps/cli && ../../node_modules/.bin/vitest run tests/unit/scripts/release-artifacts.test.ts): 11 passed.
  • node_modules/.bin/biome check scripts/release-github.mjs scripts/release-github.test.mjs scripts/release-artifacts.mjs: clean.
  • Ran main(["version-pr-body"]) against every public package's package.json and CHANGELOG.md from origin/changeset-release/main. It produced v0.2.0 with 85 changes in 45,808 characters and no platform package.
  • node scripts/check-changesets-status.mjs --base origin/main: no changeset required.
  • node scripts/check-pr-title.mjs --title "…": ok.
  • Not run: the workflow step itself. It runs on the first push to main after this merges, since the workflow's paths include both files this PR changes, and that run rewrites build: version packages #2226's description.

Release notes / changeset

  • No changeset required. Nothing shipped changes; this is release automation only.

Notes

  • What the new step relies on, checked in changesets/action@v1's source: action.yml declares the pullRequestNumber output, and src/run.ts returns it from both the create and update paths. With the default commitMode: git-cli, src/git.ts checks out changeset-release/main, resets it to the pushed commit, runs changeset version there, then commits and pushes without switching back. So the step reads the versioned checkout.
  • gh is available on the Depot runner: sync-design-tokens.yml already uses it on depot-ubuntu-24.04-4.
  • Editing the description fires pull_request: edited. Only pr-title.yml listens for that event, because the pull_request default types that CI uses don't include it.
  • changesets/action still writes its own description first, and the next step in the same job replaces it.

🤖 Generated with Claude Code

changesets/action writes a heading per bumped package and that package's
changelog section, so each change repeats under every package it ships in.
For 0.2.0 that comes to about 102,000 characters, past the action's 60,000
cap, so it dropped every changelog and #2226 lists only 24 package names,
the five server platform binaries among them.

After the action opens or updates the PR, release-publish now replaces its
description with the change list the GitHub Release uses: each change once,
with the packages it ships in, and no platform packages. Changes are omitted
as for the release body to stay under GitHub's 65,536-character limit for a
pull request; 0.2.0 needs none (85 changes, 45,808 characters).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 22:59
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Oct 27, 2026 11:01pm UTC

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review 🔄 Running since 2026-10-27T22:59:48.204059Z c7bd90e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: c7bd90e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The untested release-publish.yml step relies on unverified runtime assumptions that need a human to confirm on its first live run.

No open issues 🎉

What changed in this PR

This PR fixes the auto-generated Changesets "version PR" description (ref #2226), which currently lists 24 package headings and no actual changes. The root cause is that changesets/action repeats each change under every package it ships in, blowing past the action's ~60,000-character cap so it drops all changelog content. The fix adds a follow-up workflow step that overwrites the PR body with a deduplicated change list produced by scripts/release-github.mjs, where each change appears once with the packages it ships in, platform binary packages are excluded, and the body is trimmed to GitHub's 65,536-character PR limit using the same omission strategy as the GitHub Release body.

Changes:

  • Added renderVersionPullRequestBody and a version-pr-body CLI entry point in scripts/release-github.mjs, plus a shared fitChanges extracted from fitGeneratedReleaseFacts and a reusable readReleasePackages in release-artifacts.mjs.
  • Added a Describe the version PR's changes step in release-publish.yml that runs the script and applies it with gh pr edit --body-file.
  • Added three unit tests and updated the release runbook to describe the new PR body.
File Description
scripts/​release-github.mjs Adds the version-PR body renderer, a version-pr-body CLI command, the shared fitChanges omission loop, and a PR-specific omission notice; parameterizes logOmittedChanges/renderPackageChanges.
scripts/​release-artifacts.mjs Extracts the public-package read loop into exported readReleasePackages, reused by writeReleaseMetadata and the new renderer.
scripts/​release-github.test.mjs Adds tests for each-change-once (no platform packages), omission under the PR limit, and a too-long breaking change failing instead of being dropped.
.github/​workflows/​release-publish.yml Adds a step that regenerates the version PR body and applies it via gh pr edit, guarded on the Changesets step's pullRequestNumber.
docs/​runbooks/​manual-release.md Notes that the version PR description now lists each change once, as the GitHub Release will.

Review effort: Balanced

@fforootd
fforootd added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 884af03 Oct 27, 2026
20 checks passed
@fforootd
fforootd deleted the claude/version-pr-change-list branch October 27, 2026 23:15
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Oct 27, 2026

This branch was successfully deployed

1 active deployment
Preview — c7bd90e9 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants