-
Notifications
You must be signed in to change notification settings - Fork 707
Add setting to automatically delete branches after merge #8215
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
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
alexr00
left a comment
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.
We should be able to re-use more of deleteBranch in pullRequestReviewCommon.ts isntead of fully having a new function.
… helper Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Refactored to extract a shared |
Implementation Complete: Delete Branch After Merge Setting
githubPullRequests.deleteBranchAfterMergein package.jsonSummary
This PR implements a new setting
githubPullRequests.deleteBranchAfterMergethat automatically deletes branches after a pull request is successfully merged.Key Features
githubPullRequests.deleteBranchAfterMerge(boolean, default: false)defaultDeletionMethod.selectLocalBranchandselectRemotesettingsperformBranchDeletion()helper shared by both interactive and automatic deletionTechnical Implementation
package.jsonwith localized descriptionperformBranchDeletion()helper containing core deletion logicautoDeleteBranchesAfterMerge()builds action list and calls shared helperdeleteBranch()now also uses shared helper (with user prompts for dirty trees)pullRequestOverview.tsandactivityBarViewProvider.ts)Security & Quality
Ready for final review and merge!
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.