-
Notifications
You must be signed in to change notification settings - Fork 644
Description
Summary
When running rush publish
, the push to the main branch fails when required status checks are turned on.
Repro steps
- Run
rush publish --target-branch main --publish --apply
on a repo with required status checks
Expected result:
Rush is smart enough to wait until the status checks have passed on the publish-xyz
branch before trying to push.
Actual result:
Error:
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: 2 of 2 required status checks are expected.
Details
Example run: https://github.com/mmkal/ts/runs/1468013706?check_suite_focus=true
Workflow: https://github.com/mmkal/ts/blob/00c3abe78a91358987b5aa8af4fd1be63dd900c9/.github/workflows/publish.yml
How it could be fixed:
Hitting GitHub APIs to look for status checks might work, but could be a bit complex. A simpler solution could be to just retry the push action until the status checks have passed (at least when certain errors like this are detected, that are likely to resolve within a few minutes).
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
5.34.2 |
rushVersion from rush.json? |
5.34.2 |
useWorkspaces from rush.json? |
true |
Operating system? | Ubuntu (GitHub actions) |
Would you consider contributing a PR? | Yes, if given some pointers |
Node.js version (node -v )? |
12.x |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status