Skip to main content

Bitbucket Integration

Dispatch integrates with Bitbucket to automatically receive webhook events from your repositories.

Connecting Bitbucket​

  1. Navigate to your project's Sources page
  2. Click Connect Bitbucket
  3. Authorize the Dispatch Bitbucket OAuth app
  4. Select a repository
  5. 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:

ModeDescription
Push onlyReceive only repo:push events.
All eventsReceive every event type Bitbucket supports for the repository.
CustomPick specific event types from the full list of supported Bitbucket triggers.

Supported Bitbucket Events​

EventDescription
repo:pushCommits pushed to any branch
pullrequest:createdPull request opened
pullrequest:updatedPull request updated
pullrequest:approvedPull request approved
pullrequest:unapprovedPull request approval removed
pullrequest:fulfilledPull request merged
pullrequest:rejectedPull request declined
pullrequest:comment_createdComment added to pull request
issue:createdIssue created
issue:updatedIssue updated
issue:comment_createdComment 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:

  1. Go to Sources and find the Bitbucket source
  2. Click the unplug icon on the source, then click Disconnect to confirm
  3. 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.