Repository navigation
build: list each change once in the version PR's description - #2412
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
🔵 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
renderVersionPullRequestBodyand aversion-pr-bodyCLI entry point inscripts/release-github.mjs, plus a sharedfitChangesextracted fromfitGeneratedReleaseFactsand a reusablereadReleasePackagesinrelease-artifacts.mjs. - Added a
Describe the version PR's changesstep inrelease-publish.ymlthat runs the script and applies it withgh 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
Context
Summary
changesets/actionwrites 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.release-publishnow replaces the description with the output ofnode 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.CHANGELOG.mdfiles in the diff. To support this, the omission loop moved out offitGeneratedReleaseFactsinto a sharedfitChanges, andwriteReleaseMetadata's package loop becamereadReleasePackages, which both paths now use.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.main(["version-pr-body"])against every public package'spackage.jsonandCHANGELOG.mdfromorigin/changeset-release/main. It producedv0.2.0with 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.mainafter this merges, since the workflow'spathsinclude both files this PR changes, and that run rewrites build: version packages #2226's description.Release notes / changeset
Notes
changesets/action@v1's source:action.ymldeclares thepullRequestNumberoutput, andsrc/run.tsreturns it from both the create and update paths. With the defaultcommitMode: git-cli,src/git.tschecks outchangeset-release/main, resets it to the pushed commit, runschangeset versionthere, then commits and pushes without switching back. So the step reads the versioned checkout.ghis available on the Depot runner:sync-design-tokens.ymlalready uses it ondepot-ubuntu-24.04-4.pull_request: edited. Onlypr-title.ymllistens for that event, because thepull_requestdefault types that CI uses don't include it.changesets/actionstill writes its own description first, and the next step in the same job replaces it.🤖 Generated with Claude Code