Reputation: 12721
Does Bitbucket Server provide any routine like a delete-repository-hook
or maybe it's possible to write an an addon which supplies such a hook?
Upvotes: 1
Views: 446
Reputation: 101
It's possible to write a githook using the Java Plugin Framework which makes easier to add the hook to any of your repositories just enabling or disabling the hook in the Hook tab within the desired repository. I leave you some links I found:
A nice example: https://bitbucket.org/atlassian/bitbucket-protect-unmerged-branch-hook
A video tutorial (for Stash): https://developer.atlassian.com/blog/2015/01/beer-o-clock-stash-plugin-tutorial/
What I can not find is information about how to catch the action of deleting a branch from Bitbucket UI and not the from the client in order to perform some checkings.
Hope that helps
Upvotes: 2