-
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
gh pr merge --auto -d
does not delete the branch after merge
#9073
Comments
Reading the code this is intentional behaviour when you provide Lines 448 to 450 in af02889
However, it's not clear to me why we allow both of these flags to be provided at the same time if this is the behaviour, instead of erroring and saying "you can't do that". This seems to have been the behaviour since the |
Is the suggestion that we need to fail early if these confliction options are specified?Reviewing the code, I see we have other places we're checking for mutually exclusive options: Lines 129 to 136 in af02889
Reading through the rest of the code, Lines 583 to 601 in af02889
|
Yes, I can't see any reason that we would want to proceed in this case. I can't see any code path that would allow for the branch to be deleted if |
Describe the bug
A successful
gh pr merge --auto -d
does not delete the branch after a successful merge. It's unclear whether it's GH CLI problem or GH API.Steps to reproduce the behavior
The PR in question that didn't have a branch auto-deleted is here: karellen/karellen-llvm#40
The branch was marked for auto-merge and auto-delete here: https://github.com/karellen/karellen-llvm/actions/runs/9048046223/job/24860694266#step:4:62 (line 61)
If this is not something that can be fixed in GH CLI and GH API the documentation update is necessary to note that it's not an expected behavior.
Expected vs actual behavior
Expected: PR auto-merge will be followed by auto-delete if delete is requested.
Actual: The PR is automatically merged but the branch remains.
Logs
Above in the action items.
The text was updated successfully, but these errors were encountered: