Skip to content
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

If PR is merged, make "gh pr merge" propose cleanup steps #2625

Closed
sindrekjr opened this issue Dec 15, 2020 · 2 comments · Fixed by #2789
Closed

If PR is merged, make "gh pr merge" propose cleanup steps #2625

sindrekjr opened this issue Dec 15, 2020 · 2 comments · Fixed by #2789
Labels
enhancement a request to improve CLI help wanted Contributions welcome

Comments

@sindrekjr
Copy link

sindrekjr commented Dec 15, 2020

Currently

If a PR has already been merged through the web interface, running the command gh pr merge on my local branch currently returns the following:

! Pull request #151 (PULL REQUEST NAME) can't be merged right now; try again in a few seconds

This seems to happen whether the origin branch has been deleted or not.

Proposal

I would like gh pr merge to be able to go through the cleanup steps of deleting branches and returning to the default branch even if the target PR has already been merged.

Additional context

I see an issue related to the error message in question has been submitted already at #2544 but I don't think it pertains to this exact scenario.

@sindrekjr sindrekjr added the enhancement a request to improve CLI label Dec 15, 2020
@mislav mislav added bug Something isn't working p3 Affects a small number of users or is largely cosmetic and removed enhancement a request to improve CLI labels Dec 15, 2020
@mislav
Copy link
Contributor

mislav commented Dec 15, 2020

Thank you for reporting! I've reclassified this as a bug because the error message is definitely misleading.

@sindrekjr
Copy link
Author

After trying out the new release I've noticed that the error message I've described was removed in this commit: f853a4b

The new functionality gives the new error message ! Pull request #1 (PR_NAME) was already merged, so as a bug this issue seems to be fixed now.

However, I'd still like to suggest the enhancement that I proposed in my initial post. 😄

@mislav mislav added enhancement a request to improve CLI help wanted Contributions welcome and removed bug Something isn't working p3 Affects a small number of users or is largely cosmetic labels Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI help wanted Contributions welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants