Bitbucket Integration
Dispatch integrates with Bitbucket to automatically receive webhook events from your repositories.
Connecting Bitbucket
- Navigate to your project's Sources page
- Click Connect Bitbucket
- Authorize the Dispatch Bitbucket OAuth app
- Select a repository
- Choose which events to receive (see Event Selection below)
Dispatch will:
- Create a webhook endpoint with
provider = "bitbucket" - Register a webhook on the selected Bitbucket repository
- Configure the endpoint to receive the selected event types
Event Selection
When connecting a Bitbucket repository, choose one of three modes:
| Mode | Description |
|---|---|
| Push only | Receive only repo:push events. |
| All events | Receive every event type Bitbucket supports for the repository. |
| Custom | Pick specific event types from the full list of supported Bitbucket triggers. |
Supported Bitbucket Events
| Event | Description |
|---|---|
repo:push | Commits pushed to any branch |
pullrequest:created | Pull request opened |
pullrequest:updated | Pull request updated |
pullrequest:approved | Pull request approved |
pullrequest:unapproved | Pull request approval removed |
pullrequest:fulfilled | Pull request merged |
pullrequest:rejected | Pull request declined |
pullrequest:comment_created | Comment added to pull request |
issue:created | Issue created |
issue:updated | Issue updated |
issue:comment_created | Comment added to issue |
Signature Verification
Bitbucket webhooks include an X-Hub-Signature header with an HMAC-SHA256 signature of the request body. The format matches GitHub-style verification:
X-Hub-Signature: sha256=<hex-encoded-hmac>
Dispatch automatically verifies this against the endpoint's signing secret.
To rotate the secret, click Regenerate Secret in Edit Source: Dispatch updates the Bitbucket webhook for you, and the old secret keeps working for a while so deliveries keep verifying while the provider switches (see Signing secrets on integration sources).
Auto-Formatted Embeds
When no custom template is assigned, Dispatch auto-detects Bitbucket payloads and generates specialized embeds:
repo:push
- Shows repository name, branch, and commit summary
- Lists commit messages with authors
- Links to the diff view
Pull Request Events
- Shows PR title, description, and status
- Includes author and reviewer information
- Color-coded by action (green for created, purple for fulfilled/merged, red for rejected)
Disconnecting
To disconnect a Bitbucket repository:
- Go to Sources and find the Bitbucket source
- Click the unplug icon on the source, then click Disconnect to confirm
- Dispatch tries to remove the webhook from Bitbucket, then deletes the source (a source that still has stored events is archived instead, keeping them). If the webhook can't be removed (for example, because the Bitbucket connection was revoked), the source is still removed, and you delete the webhook yourself in Bitbucket under the repository's Repository settings → Webhooks
To remove your Bitbucket account from the project, click Add Source, choose Bitbucket, click Disconnect next to your account, and confirm. This only removes the connection: your Bitbucket sources aren't deleted, and their webhooks stay in Bitbucket. Disconnect the repositories you no longer want first, since Dispatch needs a Bitbucket connection to remove their webhooks.