-
Notifications
You must be signed in to change notification settings - Fork 518
Description
Environment details
googleapis/release-please-action@v4onubuntu-latest
Steps to reproduce
Minimal reproduction repo: https://github.com/seven332/release-please-merge-bug-repro
-
Set up a monorepo with two workspace plugins (e.g.,
node-workspace+cargo-workspace), where all packages are in subdirectories:{ "packages": { "packages/cli": { "release-type": "node", "component": "cli" }, "mylib": { "release-type": "rust", "component": "mylib" } }, "plugins": [ { "type": "node-workspace" }, { "type": "cargo-workspace" } ] } -
Make a conventional commit that triggers a release for the Node.js package (e.g.,
fix(cli): example bug fix). -
Run release-please. The release PR is created but cli is missing — only mylib appears.
Expected behavior
The release PR should contain both cli: 1.0.1 and mylib: 0.1.1.
Actual behavior
The release PR only contains mylib: 0.1.1. The cli release is silently dropped. The logs show the Merge plugin output has version: undefined:
⚠ pull request missing version {
path: '.',
pullRequest: {
title: PullRequestTitle { version: undefined, component: undefined, ... },
...
},
config: { releaseType: 'node' }
}
Analysis
The Merge plugin (src/plugins/merge.ts) does not set version on the merged pull request. It only reads component/version from rootRelease (candidates with path === '.'), which is null when all packages are in subdirectories. The second workspace plugin inherits from WorkspacePlugin (src/plugins/workspace.ts), which drops candidates without version:
if (!candidate.pullRequest.version) {
this.logger.warn('pull request missing version', candidate);
return collection;
}So the merged result from the first workspace plugin gets silently discarded by the second.
Fix
I have a fix with tests at seven332/release-please@fix/merge-plugin-missing-version. After applying the fix, the same repo correctly produces a release PR containing both cli: 1.0.1 and mylib: 0.1.1: