Add a per-PR "Delete source branch after merge" checkbox adjacent to Auto-merge button #204701
Unanswered
trikaldarshiii
asked this question in
Pull Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
Body
Summary
Currently, GitHub allows source branches to be deleted automatically after a pull request is merged through a repository-level setting. While this works well for repositories that want a consistent policy, it does not provide flexibility for individual pull requests.
I would like to propose adding a "Delete source branch after merge" checkbox directly within the Auto-merge workflow.
Proposed User Experience
When enabling Auto-merge, provide an additional option:
Why This Would Be Useful
Example Use Cases
Feature Branches
After a feature branch is merged, it is typically no longer needed and can be deleted automatically.
Shared or Long-Lived Branches
Some branches may continue to be used after the PR is merged. In these cases, maintainers can simply leave the option unchecked.
Teams Using Auto-Merge
Teams relying on Auto-merge would gain finer control
All reactions