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.

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 endpoint
  2. Click Disconnect
  3. Dispatch removes the webhook from Bitbucket and deactivates the endpoint