Repository navigation
ci(release): name the Release PR after its version and changesets - #455
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
ℹ️ No critical issues. One minor suggestion inline.
Reviewed changes
I reviewed this PR's own commit (1b2d761), which generates the Release PR title and version commit message from the pending changesets. The two #454 commits stacked underneath were not re-reviewed here.
scripts/release-meta.mjs: runschangeset status --output(read-only) and buildschore: v<version> - <subject>plus one body line per changeset. When there are no changesets it falls back tochore: version packages.release.ymlwiring: a newmetastep feedscommit-messageandpr-titleonchangesets/action.- Tests and CI:
scripts/release-meta.test.mjsruns throughpnpm test:release-metain therelease-planCI job. - Docs:
CONTRIBUTING.mddescribes the format and the--printpreview.
I checked these in the review shell with @changesets/cli 3.0.3:
node scripts/release-meta.mjs --printwith no pending changesets prints the fallback and exits 0.- With a
markdownminor changeset and athemes-colorspatch changeset, the title ischore: v2.4.0 - Mermaid diagrams now render with Mermaid 12, andcommitlintreports 0 problems. pnpm test:release-metapasses 7 of 7.- Long body lines are fine because
commitlint.config.jsdisablesbody-max-line-length. - On Node 22, which
release.ymluses,import.meta.mainis undefined and theargv[1]fallback handles it.
claude-opus-5-5 | 𝕏
1b2d761 to
6bb4076
Compare
The Release PR and its version commit were always "chore: version
packages". scripts/release-meta.mjs reads the pending changesets with
`changeset status` and builds:
chore: v<flame version> - <first sentence of the largest bump>
- <package> (<bump>): <first sentence> (one line per changeset)
The subject is shortened at a word boundary to keep the header within
commitlint's 100 characters. Without pending changesets it falls back to
"chore: version packages", which the action ignores when it publishes.
pnpm test:release-meta runs in the release-plan CI job.
6bb4076 to
d43e314
Compare
There was a problem hiding this comment.
✅ No new issues found. The empty-changeset issue from the last review is fixed.
Reviewed changes
Since the last review, the PR was rebased onto main now that #454 has merged. It is now one commit, and every changed file belongs to this PR. The release-meta script also handles a few edge cases differently:
- Filtered empty changesets: changesets with
releases: [](fromchangeset --empty) no longer get a- :body line. - Handled changesets without a summary: the body line for such a changeset is
- <package> (<bump>)with no trailing colon. The title uses the first changeset in bump order that has a summary. If none has one, the title is justchore: v<version>. - Added tests: two new cases cover both paths, which brings the total to 9.
I checked these in the review shell:
pnpm test:release-meta: 9 of 9 pass.- A summary that is only whitespace becomes
chore: v2.3.1with the body- @docubook/flame (patch), andcommitlintaccepts that message (exit 0). - The truncation budget
HEADER_MAX - prefix.length - 3matches the 3-character-separator, so the header stays within 100 characters.
claude-opus-5-5 | 𝕏

Why
Every Release PR and version commit was titled
chore: version packages, so the history onmaindoesn't say which version shipped or what changed.Changes
scripts/release-meta.mjsruns read-onlychangeset statusbeforechangesets/actionand builds the PR title and the commit message:v<flame version>. If flame isn't released, the highest next version in the linked group is used.…so the header stays within commitlint's 100 characters. The subject starts withv, sosubject-casepasses.chore: version packages. That only happens on the publish run, where the action ignores both values.release.ymlpasses the outputs tocommit-messageandpr-title.scripts/release-meta.test.mjs(pnpm test:release-meta) has 9 cases, including empty changesets (changeset --empty) and changesets without a summary, and runs in therelease-planCI job.CONTRIBUTING.mddocuments the format.Preview with the three changesets released in 2.3.0, run on top of today's
main:commitlintaccepts this message (exit 0).