[go: up one dir, main page]

Skip to content

Endpoint to Delete branches merged into specific branch

There is an endpoint (and user interface) to delete branches that are merged into the default branch: https://docs.gitlab.com/ee/api/branches.html#delete-merged-branches

However, our process (based on Gitflow) never releases from the default branch. Our default branch is develop, releases are main.

So we would like an API to delete branches that have been merged into a specific, named branch.

Our workaround now is to temporarily change the default branch to main, delete merged branches and then change it back. The scary part is we have to wait an undefined amount of time for the merged branches to be deleted (theres no feedback) during which time we just pray nobody opens a new branch of main by accident!

So a secondary ask would be that there is feedback on the deleting process in the UI and API endpoint