fix(release-plz): exit when git-cliff produces no version bump - #566
Conversation
When the only commits since the last release are non-bumping (e.g. chore(deps) Renovate commits), `git cliff --bumped-version` returns the current version. The script then reached `npm version <same>` and failed with "Version not changed" (exit 1). Bail out early when the bumped version equals the latest tag / current package version, so the release-plz job succeeds with nothing to do. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
Greptile SummaryThis PR makes the release workflow exit successfully when git-cliff reports no version bump. The main changes are:
Confidence Score: 4/5The release version guard needs to reject stale versions before merging.
scripts/release-plz.sh Important Files Changed
Reviews (1): Last reviewed commit: "fix(release-plz): exit when git-cliff pr..." | Re-trigger Greptile |
| # If git-cliff couldn't bump the version (e.g. only chore/deps commits | ||
| # since the last release), there's nothing to release. Bailing here avoids | ||
| # a later `npm version <same>` failure ("Version not changed"). | ||
| if [ "$version" = "$latest_tag" ] || [ "${version#v}" = "$cur_pkg_version" ]; then |
There was a problem hiding this comment.
When all post-release commits match git-cliff's skipped parsers, --bumped-version can return an older tag instead of the current version. Both equality checks then fail, so the workflow passes the stale version to npm version and can create a release PR that downgrades package.json; reject any version that is not greater than the current package version.
--- ## [4.2.2](https://github.com/jdx/mise-action/compare/v4.2.1..v4.2.2) - 2026-07-24 ### 🐛 Bug Fixes - **(release-plz)** exit when git-cliff produces no version bump (#566) by [@jdx](https://github.com/jdx) in [#566](#566) - ensure `tar` supports Zstd (#569) by [@JackMyers001](https://github.com/JackMyers001) in [#569](#569) ### 📚 Documentation - update default value of `cache_key_prefix` (#570) by [@muzimuzhi](https://github.com/muzimuzhi) in [#570](#570) ### New Contributors * @muzimuzhi made their first contribution in [#570](#570) * @JackMyers001 made their first contribution in [#569](#569) <!-- generated by git-cliff --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and changelog-only release PR with no application logic changes in the diff. > > **Overview** > **Release v4.2.2** — bumps the package version from `4.2.1` to `4.2.2` in `package.json` and `package-lock.json`, and prepends a **4.2.2** section to `CHANGELOG.md` (git-cliff). > > That release documents fixes merged since 4.2.1: **release-plz** exits when git-cliff reports no version bump (#566), **tar** is validated for Zstd support before use (#569), and docs correct the default for `cache_key_prefix` (#570). This PR does not change action runtime code beyond the version metadata. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 5c0c95b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: mise-en-dev <123107610+mise-en-dev@users.noreply.github.com>
Problem
The release-plz workflow fails at
npm version 4.2.1 --no-git-tag-versionwithnpm error Version not changed(exit 1).The chain of events in
scripts/release-plz.sh:package.json(4.2.1) matches the latest release (v4.2.1) → takes the "Nothing to release" branch, then checks for unreleased changes.chore(deps)Renovate commits.git cliff --bumped-versionreturns v4.2.1 (WARN > There is nothing to bump) because those commits don't trigger a semver bump.git cliff --bump --unreleasedstill emits a non-empty block that isn't exactly<!-- generated by git-cliff -->.npm version 4.2.1(same version) → npm errors out.Fix
Bail out early when the git-cliff bumped version equals the latest tag / current package version, so the job succeeds with nothing to do instead of attempting a no-op version bump.
🤖 Generated with Claude Code
Note
Low Risk
Release automation script only; no runtime product or security behavior changes.
Overview
Fixes release-plz CI failures when there are commits since the last tag but git-cliff does not semver-bump (e.g. only
chore(deps)commits).scripts/release-plz.shnow exits successfully right aftergit cliff --bumped-versionif that version still matches the latest tag orpackage.json, instead of continuing tonpm versionwith the same version and hitting Version not changed. Changelog generation is moved to run only after this check passes.Reviewed by Cursor Bugbot for commit 53b51fd. Bugbot is set up for automated code reviews on this repo. Configure here.