0

I have managed to set up some custom checks on Bitbucket server and they work ok.

However I seemingly need Bitbucket Premium to make them required, but I don't think there is a Premium option for Bitbucket Server. So how do I setup required merge checks for Bitbucket Server?

Andy Polhill
  • 6,858
  • 2
  • 24
  • 20

1 Answers1

0

You've linked to a Bitbucket Cloud document, but you're asking about Bitbucket Server.

You need to have your custom merge checks return RepositoryHookResult.rejected(String summaryMessage, String detailedMessage) (or the equivalent in your language of choice) to Bitbucket Server upon failure. https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/controlling-when-pull-requests-can-be-merged/ has some example code.

Jim Redmond
  • 4,139
  • 1
  • 14
  • 18