Integrations
Bitbucket Cloud
A Bitbucket Cloud integration connects one Bitbucket workspace to Mobius. It lets agents read repositories and pull requests, comment on pull requests, and react to repository events.
Use Bitbucket Cloud when the code your team supports lives in Bitbucket and the agent needs repository context, pull request review, or a comment posted back. Posting a comment is visible to everyone on the pull request, so add an interaction when a human should approve the wording first.
Capability map
| Capability | Value |
|---|---|
| Provider ID | bitbucket_cloud |
| Auth kind | oauth2_user |
| Connect flow | Workspace OAuth consumer, then browser authorization |
| Actions | Yes |
| Events | Yes |
| Webhook delivery | Yes |
| Event samples | No |
| Live status | Yes |
Create the OAuth consumer
Bitbucket Cloud has no Mobius app to install. Each workspace creates its own OAuth consumer, which is the credential Mobius uses on your behalf.
In Bitbucket, open Workspace settings > OAuth consumers > Add consumer, then:
-
Paste the callback URL shown on the Mobius integration page into the consumer's Callback URL field. Bitbucket refuses the connection if this does not match exactly, so copy it rather than typing it.
-
Grant these permissions:
Group Permission Account Read Workspace membership Read Repositories Read Pull requests Write -
Save the consumer, then copy its Key and Secret.
Connect Bitbucket Cloud
| Surface | Support |
|---|---|
| App | Open Integrations, choose Bitbucket Cloud, enter the workspace slug, the consumer key and secret, and a webhook signing secret, then continue through Bitbucket's authorization screen. |
| CLI | The mobius CLI does not connect Bitbucket integrations yet. Use the app or API. |
| API | Call POST /v1/integrations/providers/bitbucket_cloud/connect with workspace, client_id, client_secret, and webhook_secret, then send the user to the returned redirect URL. |
The workspace slug is the name in your Bitbucket URLs: for
https://bitbucket.org/acme/website, the slug is acme.
The webhook signing secret is a password you invent. Save the same value here and in Bitbucket so Mobius can tell real deliveries from forged ones.
Mobius stores the resulting access token and refreshes it before it expires. If the refresh ever fails, the integration is marked expired and you reconnect from the same page.
Receive repository events
Events arrive by webhook, which Bitbucket sends per repository or per project.
In Bitbucket, open the repository's Settings > Webhooks > Add webhook, then:
- Paste the webhook URL from the Mobius integration page.
- Paste the same signing secret you saved in Mobius into Secret.
- Select the repository and pull request triggers you want.
Mobius verifies the signature on every delivery and rejects anything that does not match, so a missing or mismatched secret means no events arrive.
Actions
bitbucket_cloud.pull_request.create_comment
bitbucket_cloud.pull_request.get
bitbucket_cloud.pull_request.list
bitbucket_cloud.pull_request.list_comments
bitbucket_cloud.repo.get
bitbucket_cloud.repo.get_file
bitbucket_cloud.repo.list
bitbucket_cloud.repo.list_branches
bitbucket_cloud.user.current
bitbucket_cloud.user.searchEvery action except bitbucket_cloud.pull_request.create_comment only reads.
A review agent usually lists the pull request's files and comments, decides, then
post one comment at the end.
Events
Bitbucket webhook deliveries become provider events with the bitbucket_cloud.
prefix:
bitbucket_cloud.pull_request.approved
bitbucket_cloud.pull_request.comment_created
bitbucket_cloud.pull_request.comment_deleted
bitbucket_cloud.pull_request.comment_updated
bitbucket_cloud.pull_request.created
bitbucket_cloud.pull_request.declined
bitbucket_cloud.pull_request.deleted
bitbucket_cloud.pull_request.merged
bitbucket_cloud.pull_request.unapproved
bitbucket_cloud.pull_request.updated
bitbucket_cloud.repo.pushUse bitbucket_cloud.pull_request.created for review work and
bitbucket_cloud.pull_request.comment_created when the agent should answer
human discussion. Avoid bitbucket_cloud.* unless every delivery is worth
recording.
Next
- Give the agent safe bounds with guardrails.
- Inspect received provider events from source events.
- Review event names in the event catalog.