Skip to content

ci(release): name the Release PR after its version and changesets - #455

Merged
gitfromwildan merged 1 commit into
mainfrom
ci/release-pr-title
Nov 5, 2026
Merged

gitfromwildan merged 1 commit into
mainfrom
ci/release-pr-title

Conversation

@gitfromwildan

@gitfromwildan gitfromwildan commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Why

Every Release PR and version commit was titled chore: version packages, so the history on main doesn't say which version shipped or what changed.

Changes

scripts/release-meta.mjs runs read-only changeset status before changesets/action and builds the PR title and the commit message:

chore: v<flame version> - <subject>

- <package> (<bump>): <first sentence of its changeset>
- ...
  • Version: flame's next version, which is also the product tag v<flame version>. If flame isn't released, the highest next version in the linked group is used.
  • Subject: the first sentence of the changeset with the largest bump (major > minor > patch). It is cut at a word boundary with … so the header stays within commitlint's 100 characters. The subject starts with v, so subject-case passes.
  • Body: one line per changeset, largest bump first.
  • No pending changesets: falls back to chore: version packages. That only happens on the publish run, where the action ignores both values.

release.yml passes the outputs to commit-message and pr-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 the release-plan CI job. CONTRIBUTING.md documents the format.

Preview with the three changesets released in 2.3.0, run on top of today's main:

chore: v2.4.0 - Mermaid diagrams now render with Mermaid 12

- @docubook/markdown (minor): Mermaid diagrams now render with Mermaid 12
- @docubook/flame (patch): The optional `@sentry/bun` peer dependency now accepts v11 as well as v10 (`^10.0.0 || ^11.0.0`), so installing `@sentry/bun@11` next to flame no longer prints an unmet peer warning
- @docubook/ui-react (patch): `cn()` now merges classes with `tailwind-merge` v3, which follows Tailwind CSS v4 syntax

commitlint accepts this message (exit 0).

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docu Ignored Ignored Preview Nov 5, 2026 2:10am UTC

@pullfrog pullfrog Bot 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.

ℹ️ 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: runs changeset status --output (read-only) and builds chore: v<version> - <subject> plus one body line per changeset. When there are no changesets it falls back to chore: version packages.
  • release.yml wiring: a new meta step feeds commit-message and pr-title on changesets/action.
  • Tests and CI: scripts/release-meta.test.mjs runs through pnpm test:release-meta in the release-plan CI job.
  • Docs: CONTRIBUTING.md describes the format and the --print preview.

I checked these in the review shell with @changesets/cli 3.0.3:

  • node scripts/release-meta.mjs --print with no pending changesets prints the fallback and exits 0.
  • With a markdown minor changeset and a themes-colors patch changeset, the title is chore: v2.4.0 - Mermaid diagrams now render with Mermaid 12, and commitlint reports 0 problems.
  • pnpm test:release-meta passes 7 of 7.
  • Long body lines are fine because commitlint.config.js disables body-max-line-length.
  • On Node 22, which release.yml uses, import.meta.main is undefined and the argv[1] fallback handles it.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread scripts/release-meta.mjs Resolved
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.

@pullfrog pullfrog Bot 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.

✅ 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: [] (from changeset --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 just chore: 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.1 with the body - @docubook/flame (patch), and commitlint accepts that message (exit 0).
  • The truncation budget HEADER_MAX - prefix.length - 3 matches the 3-character - separator, so the header stays within 100 characters.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@gitfromwildan
gitfromwildan merged commit d4926f3 into main Nov 5, 2026
15 checks passed
@gitfromwildan
gitfromwildan deleted the ci/release-pr-title branch November 5, 2026 02:17
@gitfromwildan gitfromwildan mentioned this pull request Nov 5, 2026
12 tasks
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