Skip to main content

Bitbucket Cloud Configuration

Creating an Access Token in Bitbucket Cloud

Required Token Permissions

Create an Access Token

Follow the steps listed below to enable automated pull requests and automated commit feedback:

  1. Log into Bitbucket Cloud.

  2. In the bottom left click your avatar and choose Bitbucket settings.

  3. In the Settings menu choose App passwords.

  4. Click the Create app password button.

  5. Choose a label for the token.

  6. Click Create.

  7. Save the app password somewhere safe. Once you leave or refresh the page you won’t be able to access it again.

  8. Note that for Bitbucket Cloud the username for the account is also required.

add bitbucket.png

See this article for more information on Bitbucket Cloud App passwords.

Protecting the Target Branch

You can prevent users from merging Pull Requests with failing IQ Policy Evaluations two ways in Bitbucket Cloud. IQ Policy Evaluations must be set to Fail at the Source Stage.

  1. For all accounts, users get notified when they don't have that number of successful builds for the most recent commit.

  2. For premium accounts, users won't be able to merge if their pull request has unresolved merge checks

Click Settings, then Branch permissions, then Add a branch permission.

Protect Bitbucket branch.png

Select the a branch option and desired write and merge access. Select Check the last commit for at least 1 successful build and no failed builds in the Merge checks section.

This will inform users that the requirements are not fulfilled when trying to merge. It will not prevent the merge.

Bitbucket Merge PR.png

Premium accounts have the additional ability to prevent the merge.

New_bitbucket_premium.png

This will prevent users from merging a pull request with a failed build.

bitbucket merge check.png

See these pages for more information: