Bitbucket Cloud Configuration
Creating an Access Token in Bitbucket Cloud
Required Token Permissions
Feature | Bitbucket Cloud |
---|---|
Read under Repositories | |
Write under Pull Requests | |
Create an Access Token
Follow the steps listed below to enable automated pull requests and automated commit feedback:
Log into Bitbucket Cloud.
In the bottom left click your avatar and choose Bitbucket settings.
In the Settings menu choose App passwords.
Click the Create app password button.
Choose a label for the token.
Click Create.
Save the app password somewhere safe. Once you leave or refresh the page you won’t be able to access it again.
Note that for Bitbucket Cloud the username for the account is also required.
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.
For all accounts, users get notified when they don't have that number of successful builds for the most recent commit.
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.
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.
Premium accounts have the additional ability to prevent the merge.
This will prevent users from merging a pull request with a failed build.
See these pages for more information: