Our developers have a bad habit of not deleting the branches after they merge into develop or a release. So trying to figure away to check either last time accessed or just date created so we can notify them of old branches that needed deleted.
Great question/request. There are a few ways to achieve this.
1. When a PR is merged Bitbucket Server offers to delete the source branch after the merge.
2. Add an existing hook by clicking 'Add Hook' in your repo settings [1] and find a suitable hook on the Atlassian Marketplace
3. Write your own PostReceiveHook (called after merge) [2]
Let me know if you need any further guidance. We at Izymes have made an add-on that takes care of shaping your development and merge process from start to finish - it's called Workzone. Among a lot of other things can take care of deleting the source branch after merge. You can configure that on a branch-by-branch basis, you don't want to delete `develop` when it is merged to `release` for example :-)
[1] Documentation
I can see how this relates to your previous question.
The repository owner may choose to implement a policy (see above) to delete merged branches right after they have been merged. As this only happens on the server, but not on the developers' machine, developers can still maintain a local branch, if they choose to. Then it is the developers' responsibility to declutter local branches that have been merged, but not yours.
As my father used to say: "Trust is good, control is better." LOL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.