Skip to content

Bitbucket integration

Pulse integrates with Bitbucket Cloud to receive data about changes and deployments, necessary to calculate the metrics:

Setting up the Bitbucket integration

Note

  • The Bitbucket integration connects to a specific workspace. You must be the owner of that Bitbucket workspace to proceed with the integration setup.
  • See below the permissions that Pulse requires from your Bitbucket account.

To set up the Bitbucket integration:

  1. On Pulse, expand Integrations and select Bitbucket.

  2. Click Install Bitbucket App.

    Installing the Pulse Bitbucket App

  3. Choose the workspace that you want to connect the integration to and click Complete setup to confirm. You can only select a workspace where you have owner permissions.

    Choosing the Bitbucket workspace

  4. Wait until you get a confirmation that Pulse successfully connected the integration to Bitbucket.

    Pulse Bitbucket integration set up successfully

If there is an error please contact support.

Automatic deployment detection using merged pull requests

Note

  • Pulse uses your merged pull requests to automatically detect your deployments. Other strategies to detect deployments will be available with a future version of Pulse.
  • If you use a squash merge strategy when merging the pull request, Pulse may produce inaccurate accelerate metrics.
  • Pulse considers a deployment every merged pull request that targets the default branch of the repository.
  • The deployment date is the timestamp when the corresponding pull request is merged.
  • The set of changes in a deployment is the list of commits in the corresponding pull request.
  • Pulse associates all the Bitbucket user groups of the author of a merged pull request with the corresponding deployment, excluding the user groups with less than two members. Pulse only takes the changes to Bitbucket user groups into account on pull requests merged after those changes.

Collected data

The table below lists the data that the Bitbucket integration collects from your Bitbucket workspace, together with:

  • The mapping between the data collected from Bitbucket and the Pulse data model
  • The metrics that Pulse displays on the dashboards, calculated using the collected data
Data collected from Bitbucket Mapping to Pulse data model Used in
Pull request commits

Changes:

  • change_id: commit UUID
  • time_created: commit author date1
  • system: repository name
Lead time for changes on the Accelerate Overview dashboard
Pull requests

Deployments:

  • deploy_id: unique pull request identifier
  • system: repository name
Deployment frequency and Change failure rate on the Accelerate Overview dashboard
Pull requests - Changes & Reviews dashboard,
Work in Progress dashboard
User groups

Deployments:

  • teams: Bitbucket user groups of the author of a deployment2
Filters the Accelerate Overview dashboard, Changes & Reviews dashboard, and Work in Progress dashboard by the contributions made by the team

1: Pulse uses the commit author's date since it's more accurate. The committer date can be changed (for example, with a fast-forward) and stop reflecting the real creation date of the change.

2: Adding a new user group or changing the composition of a user group on Bitbucket only affects new data starting from that moment and doesn't have an immediate impact on the dashboards. Also, deleted user groups on Bitbucket are still visible in Pulse.

Which permissions does Pulse need from Bitbucket?

Pulse requests only the necessary permissions/scopes from Bitbucket to collect changes and deployment data from the repositories in your workspace and keeps your information secure. See below the detailed list of permissions.

Scope and permissions Description
account Pulse retrieves the email of the user installing the integration, the user's workspaces and its membership, and the user groups.
repository Pulse retrieves repository information to get the default branch and the list of commits.
pullrequest Pulse retrieves pull request information to calculate several metrics presented on the dashboards. See the details here.
webhook Pulse creates webhooks to track new or deleted workspaces.
Pulse creates webhooks subscribed to the following events as a trigger to gather the corresponding data in real time:
  • pullrequest:created: pull requests creation
  • pullrequest:updated: pull requests edition
  • pullrequest:fulfilled: pull requests merge
  • pullrequest:rejected: pull requests decline
  • pullrequest:approved: pull requests approval
  • pullrequest:unapproved: deletion of pull requests approval
  • pullrequest:changes_request_created: pull requests change request
  • pullrequest:changes_request_removed: deletion of pull requests change request
  • repo:push: pushes of tags to a repository
Pulse creates webhooks subscribed to the following events as a trigger to historical data import:
  • repo:transfer: repositories tranfer acceptance
  • repo:fork: repositories fork

See also