googleapis / googleapis/release-please

Bug: Pre-release strategy forces Minor bump (0.1.1-rc.0 → 0.1.2-rc.0) ignoring recent tag and fix-only commits

Open
#2,641 5 comments 0 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: bug
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

Thanks for stopping by to let us know something could be better!

Please provide the following details.

#### Environment details

- OS: ubuntu-latest (Github Actions)
- Node.js version: Github action default
- npm version: 11.6.2
- `release-please` version: 17.1.3

#### Steps to reproduce

1. Configure `release-please` with the `node` strategy in a monorepo setup (using the `packages` config).
2. Enable pre-releases on a specific branch (e.g., `next`) with `prerelease: true` and `prerelease-type: "rc"`.
3. Establish a baseline release with a tag, e.g., `v0.1.1-rc.0`.
- Manifest: `{ ".": "0.1.1-rc.0" }`
- Git Tag: `v0.1.1-rc.0`
- GitHub Release: `v0.1.1-rc.0` exists.
4. Create a new commit with a patch-level scope, e.g., `fix: verify automatic rc increment`.
5. Run the Release Please action.

**Expected Behavior:**
The next version should be **`0.1.1-rc.1`** (incrementing the pre-release counter for a patch fix).

**Actual Behavior:**
Release Please proposes **`0.1.2-rc.0`** (bumping the minor version and resetting the pre-release counter, despite only having `fix` commits).

**Logs:**
```text
Run googleapis/release-please-action@v4
Running release-please version: 17.1.3
...
✔ Collecting release commit SHAs
❯ Found release for path ., v0.1.1-rc.0
❯ release for path: ., version: 0.1.1-rc.0, sha: ---
✔ Collecting commits since all latest releases
❯ Set(1) { '---' }
...
✔ Splitting 1 commits by path
✔ Building candidate release pull request for path: .
❯ type: node
❯ targetBranch: next
❯ commits: 1
...
❯ Fetching package.json from branch next
✔ updating from 0.1.1-rc.0 to 0.1.2-rc.0
```

It appears the pre-release strategy is calculating the next version as a Minor bump (0.1.2) rather than maintaining the Patch scope (0.1.1) for the RC iteration, even though the only new commit is a fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.