gh-poi icon indicating copy to clipboard operation
gh-poi copied to clipboard

Delete branches that belong to closed PRs.

Open electriquo opened this issue 1 year ago • 4 comments

Description Would love to see poi delete local branches that belong to closed PRs.

electriquo avatar Feb 08 '24 13:02 electriquo

Hi, thank you for your suggestions. It might be good. Currently, this tool focuses on the "clean up safely." If we have a closed PR, something wrong created the PR, and closing, this branch may be in the works and should be retained. Can you tell me about the situation of wanting to delete closed PRs?

seachicken avatar Feb 09 '24 12:02 seachicken

poi is invoked by the user and the user should always use -dry-run when the user is unsure what will be deleted.

Can you tell me about the situation of wanting to delete closed PRs?

Github has many working models. An organization might rollout a policy where it forbids forks and requires a pull-request. In such case, each pull-request is associated with a branch. When a pull-request is closed, the user might wish to invoke poi to clean these branches.

To guarantee non-breaking change, consider adding a flag such as -del-closed

electriquo avatar Feb 11 '24 07:02 electriquo

Yes, it's good to be able to delete it as an option! If you want to add functionality, we also welcome PR submitted.

seachicken avatar Feb 13 '24 11:02 seachicken

@seachicken If I knew Go lang, I would have already made a PR ;)

electriquo avatar Feb 14 '24 08:02 electriquo