Configure Bitbucket Webhooks

Last updated 3 months ago

After the Bitbucket posting user has been created and the repositories are populating in PullRequest successfully, the Bitbucket webhooks can be configured.

These steps for configuring Bitbucket webhooks will need to be repeated for each Bitbucket repository subject to PullRequest code review.

Configure webhooks

From the PullRequest Proxy home screen, click the Repositories tab in the left sidebar. You should see a list of all of the repositories the PullRequest posting user appropriate access to.

Click on a repository's Configure button. This will open a Bitbucket configuration page to create a webhook for the selected repository.

Use these options when creating the webhook:

The URL for your webhook should be the base URL of your Proxy with the following:

/webhooks/bitbucket

OPTIONAL - Add a webhook secret. The secret will be used to sign your webhook requests as they are posted to the proxy:

  • You will need the same webhook secret for all of your repositories if you add one.

  • Update your webhook secret in the PullRequest Proxy UI if you are adding one, otherwise the proxy will not be able to verify/process the webhooks.

Webhook events

The following webhook events are needed:

Component

Events

Repository

PUSH MODIFED

PullRequest

ALL EVENTS

Click the Test connection button in the repository webhook configuration UI in Bitbucket and make sure you get a 200 status.

If you don't get a 200 it's likely that the webhook secret (if used) or URL may not be correct.

Make sure the webhook is set to Active at the bottom of the Bitbucket configuration page and click Create.

Repeat these steps for any other repositories that are in your list and have not been configured.

The PullRequest Proxy repositories table has a LAST WEBHOOK RECEIVED column which will update once you start getting webhooks from Bitbucket for the repository.

The Test connection hook isn't counted.

‚Äč