Skip to content

Comments

fix: preserve version in merge plugin when no root candidate exists#2687

Open
seven332 wants to merge 1 commit intogoogleapis:mainfrom
seven332:fix/merge-plugin-missing-version
Open

fix: preserve version in merge plugin when no root candidate exists#2687
seven332 wants to merge 1 commit intogoogleapis:mainfrom
seven332:fix/merge-plugin-missing-version

Conversation

@seven332
Copy link

@seven332 seven332 commented Feb 21, 2026

When all packages live in subdirectories (no package at path '.'), the Merge plugin failed to set the version field on the merged pull request. This caused downstream workspace plugins to drop the merged candidate because they filter out candidates without a version.

This is a problem in polyglot monorepos that use multiple workspace plugins (e.g. node-workspace + cargo-workspace): the second plugin's run() method drops the first plugin's merged result due to missing version.

Fix: fall back to the first in-scope candidate when there is no root-path candidate, and always propagate the version field to the merged pull request.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2686 🦕

When all packages live in subdirectories (no package at path '.'),
the Merge plugin failed to set the version field on the merged pull
request. This caused downstream workspace plugins to drop the merged
candidate because they filter out candidates without a version.

This is a problem in polyglot monorepos that use multiple workspace
plugins (e.g. node-workspace + cargo-workspace): the second plugin's
run() method drops the first plugin's merged result due to missing
version.

Fix: fall back to the first in-scope candidate when there is no
root-path candidate, and always propagate the version field to the
merged pull request.
@seven332 seven332 requested review from a team as code owners February 21, 2026 14:17
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge plugin drops version field, causing second workspace plugin to silently discard candidates

2 participants