Skip to content

[rush] rush publish seems to be completely ignoring the branch argument #5760

@kgetz-arista

Description

@kgetz-arista

Summary

I'm trying to run this command:

rush publish -a --target-branch trunk -p

It doesn't matter if I use -b or --target-branch; either way, Rush seems to be ignoring the argument entirely. In the output, I can see that it's creating a branch named publish-1775694549480, which it's trying to push to, but failing:

remote: Processing changes: refs: 3, done
To ssh://gerrit.corp.arista.io:29418/event-viewer
 ! [remote rejected]         HEAD -> publish-1775694549480 (prohibited by Gerrit: Unable to resolve object 'commit aa2ca412919a687e2c7e4c73066453c0b5af8c93 1775694553 ------p'. Check that the object exists on the server or get update permission to create new commit objects.)

Repro steps

Try to specify a branch while publishing.

Expected result: Rush uses the branch.

Actual result: Rush ignores the argument and creates its own branch anyway.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.169.3
rushVersion from rush.json? 5.169.3
pnpmVersion, npmVersion, or yarnVersion from rush.json? 10.32.1
(if pnpm) useWorkspaces from pnpm-config.json? yes
Operating system? Windows 11
Would you consider contributing a PR? No
Node.js version (node -v)? 24.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions