-
Notifications
You must be signed in to change notification settings - Fork 31
Actually abandon PRs #28
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -948,6 +948,10 @@ def land_pr(e: StackEntry, remote: str, target: str): | |||||
| input=pr_body.encode(), | ||||||
| ) | ||||||
|
|
||||||
| def abandon_pr(e: StackEntry): | ||||||
| log(b("Abandoning ") + e.pprint(), level=2) | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| run_shell_command(["gh", "pr", "close", e.pr]) | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
|
||||||
| def delete_local_branches(st: List[StackEntry]): | ||||||
| log(h("Deleting local branches"), level=1) | ||||||
|
|
@@ -1071,6 +1075,7 @@ def command_abandon(args: CommonArgs): | |||||
|
|
||||||
| last_hash = "" | ||||||
| for e in st: | ||||||
| abandon_pr(e) | ||||||
| last_hash = strip_metadata(e) | ||||||
|
|
||||||
| log(h("Rebasing the current branch on top of updated top branch"), level=1) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more comment: the code is organized in sections corresponding to top-level command (LAND/VIEW/SUBMIT/ABANDON). So this function probably should be moved to the "ABANDON" section (after line 1040).