-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ask before merging if CI failed or is pending #2623
Comments
I love this idea! The proposed prompt makes sense to me 👍 |
Hey @camelid, it seems like we already support this behavior/throwing if you add required CI status' to your branch protection rules/repo settings. |
Ah, I didn't know that. It might still be useful to have a warning even if the user doesn't have enforced branch protection though. The web UI has a visual clue of whether checks have passed based on the color of the merge button, whereas AFAIK there's nothing like that in the CLI. |
Describe the feature or problem you’d like to solve
In the GitHub.com UI, the 'Merge pull request' button is not filled in if CI failed or is still pending. However, the GitHub CLI does not notify you if the checks failed or if they are still pending when you run
gh pr merge
. It would be helpful to ask 'Are you sure?' if CI failed or is pending so that one does not need to remember to rungh pr checks
before merging.Proposed solution
Add an 'Are you sure?' prompt at the beginning of the
gh pr merge
workflow if CI failed or is pending. I'm thinking something like:and this if checks are pending:
The text was updated successfully, but these errors were encountered: