Open khatchad opened 8 months ago
Sorry for the long delay in responding here after Christmas. Some team churn a large backlog.
Can you confirm that this still occurs for you, and if so, can you provide the output of gh pr merge --auto
with GH_DEBUG=api
env var set?
No prob. I haven't seen this work yet. I don't want to merge PRs that haven't had their checks pass. I noticed that if I add more CLI flags to the command the problem doesn't happen. But, if I just use --auto
, it always happens.
$ gh --version
gh version 2.44.1 (2024-02-16)
https://github.com/cli/cli/releases/tag/v2.44.1
I don't want to merge PRs that haven't had their checks pass.
Totally understand.
I noticed that if I add more CLI flags to the command the problem doesn't happen. But, if I just use --auto, it always happens.
That's pretty interesting. Looking forward to the debug logs!
Perhaps you could also provide a debug log with other flags so we can compare the requests/responses.
We also seem to have this issue, although maybe I just misunderstand the --auto
feature. Debug log attached (slightly redacted---can supply OOB if required). We are using rule sets that require all status checks to pass and interestingly(?) they are shown as 'passed', so possibly the problem is not the auto merge, but the build config?
I noticed that if I add more CLI flags to the command the problem doesn't happen
We're having this issue as well. What flags were you using when it didn't happen? Thanks @khatchad.
I noticed that if I add more CLI flags to the command the problem doesn't happen
We're having this issue as well. What flags were you using when it didn't happen? Thanks @khatchad.
gh pr merge --auto --delete-branch --squash
gh pr merge --auto --delete-branch --merge
Looks like this problem has gotten worse. On gh version 2.48.0 (2024-04-17), I just tried gh pr merge --auto --delete-branch --merge
, and the problem happened with those arguments as well.
I wonder if this problem has something to do with --delete-branch
now. I would think it would be difficult to "Delete the local and remote branch after merge" if --auto
is also specified.
experienced the same issue without --auto
today.
I used gh pr merge --squash
and this command failed a few time. But after the CI build completed and failed. That command still merged the PR.
Describe the bug
When I issue
gh pr merge --auto
, the PR merges even though the checks haven't completed. It would seem to me that the command is ignoring the--auto
flag. The version ofgh
I am using is 2.40.1.Steps to reproduce the behavior
gh pr merge --auto
Expected vs actual behavior
I expect the PR to go into auto merge mode, i.e.,, to merge once the checks complete. The docs say:
for the flag
--auto.
Instead, the PR merges with the checks still running.