With Bitbucket Server 4.9, repository admins can choose which merge strategies to allow, and set a default merge strategy.
The current, default, merge strategy ensures that merge commits are created after merging a pull request. These record the pull request number and branch name, helping to tie the merge back to a JIRA and a code review. Removing these commits may remove some valuable audit information.
We are trying to make an event handler ( repository modificationevent ) that will cancel the modification to repository if the merge strategy is changed from the default one .
We can also look at the possibility of hiding the UI web element of the merge strategies altogether.
Need some directions on this .
Thanks