Connect Bitbucket
Connect Bitbucket Cloud or your own Bitbucket Data Center with a token that can only read, and its webhook.
In short
Connect Bitbucket once for the whole organization. Boards then link branches and pull requests to cards, and designs follow the code, through it. {{brand}} only ever reads.
Before you start
- Who: someone who may manage the organization's connections - owners and admins have it by default.
- Plan: Bitbucket Cloud works on every plan; a Bitbucket Data Center of your own comes with the Enterprise plan.
- First: a repository, project or workspace access token with Repositories (Read) and Pull requests (Read) only - or an Atlassian API token with read scopes.
Where it lives
- Open your organization, then Settings › "Connections", and press "Connect a code host".
- Choose "Bitbucket". Under "Which Bitbucket?" choose Bitbucket Cloud, or Bitbucket Data Center and type its address.
- Press "Next" - for a Data Center, "Check this step" first.
Sign in
- Press "Open the token page" and make an access token with Repositories (Read) and Pull requests (Read). Nothing that writes.
- Paste it into "Access token". For an Atlassian API token, write your email, a colon and the token: [email protected]:token.
- Type one repository into "A repository to check with", such as acme/payments-api (on Data Center PROJECT/repository).
- Press "Check this step": it signs in, reads the repository and its default branch, and refuses a token that can write.
Webhook
- Press "Make the address and secret". Copy each - the secret is shown only now.
- In Bitbucket open the repository's settings, Webhooks, Add webhook. Paste the address as the URL and the secret as the Secret.
- Tick Repository push and the Pull request events created, updated, merged and declined, then Save.
- Push a commit to send a first delivery, then press "Look for a delivery".
Check and use
- Press "Run the full check". Every step should say Passed; a step that failed names what to change.
- Under "Where will you use it?" tick Boards, Designer and API Tester as you need them.
- Optional: under "Only these teams" tick the teams that may pick it. Leave it empty for everyone who may use those modules.
- Check the "Name" and press "Finish". The connection shows under "Connections" with its health.
If a step fails
- A failed step names its code, what it means and what to change. The code's section of /help/settings/fix-a-company-connection says more.
- Change what the step says and press "Check again". The next step opens only when this one passes.
- Closing the wizard keeps every step that passed. Press "Continue setup" on the connection's row to go on where you stopped.