Skip to content

ci(release): include version number in Release PR title#204

Merged
aspiers merged 1 commit into
mainfrom
ci/release-pr-title-version
Apr 9, 2026
Merged

ci(release): include version number in Release PR title#204
aspiers merged 1 commit into
mainfrom
ci/release-pr-title-version

Conversation

@aspiers
Copy link
Copy Markdown
Contributor

@aspiers aspiers commented Apr 8, 2026

Summary

  • Rename the changesets Release PR to `Release v` after `changesets/action` runs, by reading `package.json` from the `changeset-release/main` branch and calling `gh pr edit`.
  • Drop the `chore:` prefix from the static `title` / `commit` inputs.

Why

`changesets/action` does not support templating the version into the Release PR title or commit message — it accepts only a static string, and the default (`Version Packages`) also lacks the version. This is a long-standing upstream gap tracked in changesets/action#388 (open since Aug 2024), with related issues #303 and #353. The workaround used here — renaming the PR after the fact — is what several commenters on those issues report doing.

Notes

  • Only the PR title is rewritten. The branch commit message stays as the static `Release` value; it gets rewritten on every re-run of the workflow anyway, and the merge commit title on `main` is controlled by whoever merges.
  • The step is gated on `RELEASE_TYPE == 'stable'` and only runs when `changesets/action` actually opened or updated a PR (`pullRequestNumber` output is non-empty). On the publish run (when there are no pending changesets) it's a no-op.
  • The beta release path is untouched — it publishes directly without a PR, so there's nothing to rename.

Test plan

  • Merge this PR.
  • Trigger the `Release` workflow manually on `main`. Confirm the existing Release PR is renamed to `Release v`.
  • Confirm a subsequent re-run (after an additional changeset lands) still renames correctly with the new version.
  • Confirm the publish run (after merging the Release PR) does not error on the rename step.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced release process automation with improved release PR identification and naming conventions for better tracking of stable releases.

changesets/action does not support templating the version into the PR
title or commit message (changesets/action#388). Add a post-processing
step that reads the bumped version from package.json on the release
branch and renames the PR to 'Release vX.Y.Z'.

Also drop the 'chore:' prefix from the static title/commit values.
Copilot AI review requested due to automatic review settings April 8, 2026 12:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: 96f9ef2

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0abc9017-33dd-4535-a3ae-9057f86ede6d

📥 Commits

Reviewing files that changed from the base of the PR and between 2aecfa6 and 96f9ef2.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow was updated to improve stable Release PR metadata. The changesets/action configuration was modified, and a new stable-only post-processing step was added to automatically rename Release PRs with their version numbers using Release v<version> format.

Changes

Cohort / File(s) Summary
Release Workflow Enhancement
.github/workflows/release.yml
Updated changesets/action metadata (title and commit message changed from "chore: release package" to "Release"). Added a new stable-only step that fetches the bumped version from package.json and renames the Release PR title to include version information via gh pr edit. Beta release flow unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 Release tags now shine with version bright,
No more generic names in PR sight,
A bunny's touch on workflows divine,
Each version labeled, perfectly aligned! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding version numbers to Release PR titles in the CI workflow. It directly relates to the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Lexicon Documentation Sync ✅ Passed The custom check for 'Lexicon Documentation Sync' does not apply to this PR, which only modifies .github/workflows/release.yml, a CI/CD configuration file excluded from the check's scope.
Lexicons Styleguide Compliance ✅ Passed PR modifies only .github/workflows/release.yml; no lexicon files in /lexicons directory are added, removed, or modified.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-pr-title-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the stable release GitHub Actions workflow to produce clearer release PR titles by including the published package version, working around changesets/action’s lack of title templating.

Changes:

  • Switch changesets/action PR title/commit inputs from a chore:-prefixed string to a static Release.
  • Add a post-step that reads the bumped version from changeset-release/main and renames the release PR to Release v<version> via gh pr edit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@s-adamantine s-adamantine self-requested a review April 9, 2026 11:12
Copy link
Copy Markdown
Contributor

@s-adamantine s-adamantine left a comment

Choose a reason for hiding this comment

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

nice, lgtm

@aspiers aspiers merged commit 8f4c839 into main Apr 9, 2026
10 checks passed
@aspiers aspiers deleted the ci/release-pr-title-version branch April 9, 2026 11:25
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.

3 participants