Bitbucket
Bitbucket Cloud and Data Center connect repository work to Mobius.
A Bitbucket integration connects either a Bitbucket Cloud workspace or a self-hosted Bitbucket Data Center instance to Mobius. Assistants can 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 an assistant needs repository context, pull request review, or a comment posted back.
Capability map
| Version | Provider ID | Auth kind | Connect flow |
|---|---|---|---|
| Cloud | bitbucket_cloud | oauth2_user | Workspace OAuth consumer, then browser authorization |
| Data Center | bitbucket_server | api_key | Base URL and personal access token |
Both versions provide actions, webhook events, and a live status check. Neither currently provides event samples.
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 Build > 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.
A Bitbucket workspace connection is team-managed. An organization administrator connects or reconnects it. The OAuth token still acts with the permissions of the Bitbucket user who completed authorization, within the configured workspace and consumer scopes.
Open the connected account and use Assistant access to grant this exact workspace to the assistants that need it. Choose the whole team or named people as its Mobius result audience. This grant covers conversations and routines; each routine still saves the exact connection it will use.
Connect Bitbucket Data Center
Open Build > Integrations, choose Bitbucket Data Center, and enter:
- Bitbucket base URL, such as
https://bitbucket.company.example. - Personal access token for the Bitbucket user whose permissions Mobius should use.
- Auth scheme. Keep
bearerfor a personal access token. Usebasicand add Username only when your instance requires username and token basic authentication. - Webhook signing secret, using the same value you will configure in Bitbucket.
The API equivalent is
POST /v1/integrations/providers/bitbucket_server/connect with base_url,
token, auth_scheme, optional username, and webhook_secret.
Data Center connections are team-managed. Mobius must be able to reach the base URL, and Bitbucket must be able to reach the Mobius webhook endpoint. After connecting, grant the exact instance under Assistant access and choose its Mobius result audience.
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 assistant usually lists the pull request's files and comments, then
posts one comment at the end. That comment runs without an automatic Mobius
confirmation after the exact Bitbucket connection and assistant grant are
rechecked. Use an explicit interaction when the instructions call for review;
repository permissions remain the enforcement boundary.
Bitbucket Data Center exposes the same action suffixes under the
bitbucket_server. prefix. Its comment action is
bitbucket_server.pull_request.create_comment; the rest are read-only.
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 assistant should answer
human discussion. Avoid bitbucket_cloud.* unless every delivery is worth
recording.
Data Center uses the same event suffixes under bitbucket_server.. Choose the
prefix that matches the connection instead of subscribing to both.
Next
- Review account access in Connect accounts.
- Give the assistant safe bounds with guardrails.
- Inspect received provider events from source events.
- Review event names in the event catalog.