Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Delete after merging fails to delete feature branch (Clean up failed)

Christian Wuillemin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 16, 2022

We run a Bitbucket server v7.20.0 and merge feature branches by pull requests into the master branch. We use the "Delete after merging" feature to let Bitbucket clean up the feature branches after they have been merged into master.

However on an irregular basis this operation fails. The code is merged successfully, but the feature branch doesn't get deleted. The error message reads: "Clean up failed. The pull request was merged, but source branch couldn't be deleted". We then have to delete the branches manually, which of course defeats the purpose.

Bitbucket-Delete-FeatureBranch-Error.png

As the documentation explains (https://confluence.atlassian.com/bitbucketserver0720/merge-a-pull-request-1116281190.html), certain criteria must be met in order for this feature to work. All of them apply to our configuration (it's not the default branch, permissions are set and no other pull requests are open). The issue happens on and off for the same user on the same repository.

I haven't found any open issues or related articles about this. Does anyone know what's the problem here and how to fix it?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events