Bitbucket Cloud works as a forge (branches, pull requests, comments) and can start work from pull request events.
Set up
- Create a workspace or repository access token with Repositories: write and Pull requests: write, and set it as
BITBUCKET_TOKEN. With an app password instead, also setBITBUCKET_USERNAME. - Add a webhook to
POST /webhooks/bitbucketwith a secret, for Pull request created, Pull request comment created and Repository push. Set the secret asBITBUCKET_WEBHOOK_SECRET. Kiln checks theX-Hub-Signatureheader. - Set
BITBUCKET_BOT_ACCOUNTS(comma-separated) to the accounts Kiln posts as, so their own activity is recognized. - List the repositories in
factory.yamlwithforge: bitbucket.owneris the workspace.
Starting work
| Event | Fires when | Filters |
|---|---|---|
pull_request_created |
A pull request is created. | repos, base_branches, authors, keywords |
pull_request_commented |
Someone comments on a pull request. | repos, authors, keywords, mentioned |
push |
A branch is pushed. | repos, branches |
---
triggers:
- provider: bitbucket
event: pull_request_commented
filter: { mentioned: [kiln] }
---Bitbucket pull requests have no labels, so label filters and routing labels do not apply.