...
Navigate to the repository’s administration section → Branch restrictions → Merge settings (tab). (https://bitbucket.org/YOURWORKSPACE/YOURREPO/admin/branch-restrictions)
Enable the appropriate number of required successful builds. The merge checks count as one build.
If you are using Bitbucket premiumPremium, you can optionally enforce the merge checks.
...