In this page

Overview

This page provides instructions for administering the system settings of the Better Commit Policy Connector for Bitbucket Cloud. It focuses on settings that are needed for the correct functioning of the app or ones that control the app's behavior globally.

Enable custom merge checks

To use custom merge checks, a Bitbucket administrator must enable them for the entire workspace first. This is a one-time setup step that ensures that custom merge checks are available for all repositories in the workspace.

Important: if at least one repository in the workspace is already using custom merge checks, you can safely skip this guide, as custom merge checks are already enabled!

Configuration steps:

  1. Click the cog icon "⚙" in the top right → Workspace settingsCustom merge checks.
  2. Click the Enable button. (If the button is not visible, it means custom merge checks are already enabled.)
  3. You're done!

Set up the commit policy checker merge check

After you've enabled custom merge checks for the workspace, an administrator needs to set them up. You can configure them at three different levels - we've created a guide for each:

  1. Repository level (available on all plans)
  2. Project level (✨ Bitbucket Premium plan only)
  3. Workspace level (✨ Bitbucket Premium plan only)

Set up the commit policy checker merge check at the repository level

When you set up a custom merge check at the repository level, it will run on pull requests targeting that specific repository.

Steps:

  1. Go to the repository → Repository settings (the cog icon "⚙" in the left-bar) → Custom merge checks.
  2. Click Add check next to Better Commit Policy Connector for Bitbucket.
  3. Select Commit policy satisfied from the list of available checks.
  4. Choose All branches to apply the check to all branches in the repository.
  5. Check the Required option to make the merge mandatory.
  6. Click Save.
  7. You're done!

Set up the commit policy checker merge check at the project level

When you set up a custom merge check at the project level, it will run on pull requests targeting any repository within that project. ✨ This feature is only for the Bitbucket Premium plan.

Steps:

  1. Go to Projects (in the top) → click the project → Project settings (the cog icon "⚙" in the left-bar) → Custom merge checks.
  2. Click Add check next to Better Commit Policy Connector for Bitbucket.
  3. Select Commit policy satisfied from the list of available checks.
  4. Choose All branches to apply the check to all branches in the repository.
  5. Check the Required option to make the merge mandatory.
  6. Click Save.
  7. You're done!

Set up the commit policy checker merge check at the workspace level

When you set up a custom merge check at the workspace level, it will run on all pull requests across the workspace. ✨ This feature is only for the Bitbucket Premium plan.

Steps:

  1. Go to Settings (the cog icon "⚙" in the top right) → Workspace settingsCustom merge checks.
  2. Click Add check next to Better Commit Policy Connector for Bitbucket.
  3. Select Commit policy satisfied from the list of available checks.
  4. Choose All branches to apply the check to all branches in the repository.
  5. Check the Required option to make the merge mandatory.
  6. Click Save.
  7. You're done!

You can set up merge checks with two levels of strictness:

  1. Required: ✨ This feature is only for the Bitbucket Premium plan. It means pull requests must completely satisfy the commit policy before they can be merged. If a condition is violated, merging is blocked.
  2. Recommended: This feature is available on all Bitbucket plans. It means pull requests can still be merged even if they don't meet all the commit policy conditions. You'll see the precise list of violations, but they won't prevent merging.

If you are on a Premium plan, we suggest using Required.

Questions?

Ask us any time.