Skip to content

fix(release-plz): exit when git-cliff produces no version bump - #566

Merged
jdx merged 1 commit into
mainfrom
claude/mise-action-workflow-failure-411329
Jul 21, 2026
Merged

fix(release-plz): exit when git-cliff produces no version bump#566
jdx merged 1 commit into
mainfrom
claude/mise-action-workflow-failure-411329

Conversation

@jdx

@jdx jdx commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Problem

The release-plz workflow fails at npm version 4.2.1 --no-git-tag-version with npm error Version not changed (exit 1).

The chain of events in scripts/release-plz.sh:

  1. package.json (4.2.1) matches the latest release (v4.2.1) → takes the "Nothing to release" branch, then checks for unreleased changes.
  2. There are 6 commits since v4.2.1, but they're all chore(deps) Renovate commits.
  3. git cliff --bumped-version returns v4.2.1 (WARN > There is nothing to bump) because those commits don't trigger a semver bump.
  4. The existing changelog guard doesn't catch this — git cliff --bump --unreleased still emits a non-empty block that isn't exactly <!-- generated by git-cliff -->.
  5. The script proceeds to 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.sh now exits successfully right after git cliff --bumped-version if that version still matches the latest tag or package.json, instead of continuing to npm version with 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.

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>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jdx, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ba3cd605-4ee7-4644-9af5-f0af7aa9b260

📥 Commits

Reviewing files that changed from the base of the PR and between 3a3b22b and 53b51fd.

📒 Files selected for processing (1)
  • scripts/release-plz.sh

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.

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes the release workflow exit successfully when git-cliff reports no version bump. The main changes are:

  • Fetch the proposed version before generating the changelog.
  • Stop when it matches the latest tag or current package version.
  • Avoid passing an unchanged version to npm.

Confidence Score: 4/5

The release version guard needs to reject stale versions before merging.

  • Exact no-bump output now exits successfully.
  • An older git-cliff result can still reach npm and produce a downgrade release PR.

scripts/release-plz.sh

Important Files Changed

Filename Overview
scripts/release-plz.sh Adds an early no-bump exit, but an older version from git-cliff can bypass the equality guard.

Fix All in Claude Code

Reviews (1): Last reviewed commit: "fix(release-plz): exit when git-cliff pr..." | Re-trigger Greptile

Comment thread scripts/release-plz.sh
# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Stale Version Bypasses Guard

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.

Fix in Claude Code

@jdx
jdx enabled auto-merge (squash) July 21, 2026 17:39
@jdx
jdx merged commit a63ca4f into main Jul 21, 2026
17 of 18 checks passed
@jdx
jdx deleted the claude/mise-action-workflow-failure-411329 branch July 21, 2026 17:39
@jdx jdx mentioned this pull request Jul 21, 2026
jdx added a commit that referenced this pull request Jul 24, 2026
---
## [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>
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