Step 7 of 15

Connect Bitbucket to Pullwise

Connect Bitbucket Cloud repositories to Pullwise with an access token and a pull request webhook protected by a secret, step by step.

6 min For adminsUpdated

Works with Bitbucket Cloud (bitbucket.org).

1. Create an access token in Bitbucket

Create a workspace access token to cover every repository in your Bitbucket workspace, or a repository access token for just one.

  • Workspace: Workspace settings → Security → Access tokens → Create access token.
  • Repository: Repository settings → Security → Access tokens → Create access token.

Give it these scopes:

Scope Access
Repositories Read
Pull requests Write (includes read)

Select Create and copy the token. Bitbucket shows it only once.

2. Save it in Pullwise

  1. Open SCM and select Connect on the Bitbucket card.
  2. Paste the Access token.
  3. Paste your Webhook secret.
  4. Leave API base blank.
  5. Select Save, then switch Bitbucket on.
Connect Bitbucket dialog with the access token and webhook secret filled in
Connect Bitbucket with your token and webhook secret. Tap the image to enlarge it.

3. Add the webhook in Bitbucket

Type your workspace subdomain to fill in the URL:

Webhook URLhttps://your-subdomain.pullwise.ai/v1/webhooks/bitbucket

In the repository, go to Repository settings → Webhooks → Add webhook:

Add new webhook
Title
Pullwise
URL
https://acme.pullwise.ai/v1/webhooks/bitbucket
Secret
••••••••••••••••••••••••
TriggersRepository pushPull request: CreatedPull request: Updated
Save
Illustration of the webhook form in Bitbucket, filled in. Labels match Bitbucket; the layout is simplified.
  1. Title: Pullwise.
  2. URL (1): your webhook URL from above.
  3. Secret (2): your webhook secret.
  4. Triggers (3): choose Choose from a full list of triggers, then under Pull Request tick Created and Updated. Untick Repository push.
  5. Select Save.

Bitbucket webhooks are set per repository, so repeat this for each repository you want reviewed.

4. Test it

Open or update a pull request, then select View requests on the webhook.

What triggers a review

A pull request being created or updated with new commits.

If something goes wrong

Response or symptom Cause Fix
401 The secret doesn’t match Re-enter the same secret in Bitbucket and Pullwise.
404 Wrong workspace subdomain in the URL Check the URL.
201 with ignored Wrong trigger, or Bitbucket is switched off in Pullwise Tick Pull Request Created and Updated, and check the card says Connected.
No repositories visible to this token The token can’t see any repositories Use a workspace token, or create the token in the right repository.
Bitbucket card showing No repositories visible to this token
If the token can't see any repositories, Pullwise says so under the card. Tap the image to enlarge it.

More fixes in troubleshooting.

Next

Choose which repositories are reviewed.

Stuck? Ask the assistant, check troubleshooting or contact support.

Choose which cookies we may use. You can change this at any time from the footer.

Cookie categories