Supported webhook events:
- Repository – Push
- Pull request – Created
- Pull request – Updated
to see Webhook setup for Bitbucket Cloud.)
Setting up webhooks for Bitbucket Cloud
Configure webhook by logging in to your Bitbucket.
-
Open a project by clicking on it.
Click Repository Settings then under WORKFLOW, select Webhooks.
-
Click Add webhook to create a webhook for the repository. The Add new webhook screen appears.
-
Title – This is the title name for this webhook.
-
URL – This field accepts the webhook url from your Git Integration for Jira app ➜ Webhooks setting.
-
Triggers – By default, the trigger for the webhook is a repository push. If you want different actions to trigger the webhook, click Choose from a full list of triggers. The list of all the webhook trigger event types is displayed.
Set the necessary scope depending on your organization access/usage rules. For this guide, choose the following triggers:
-
Repository – Push (required)
-
Pull Request (optional) – select these options to also include the pull request triggers
-
Created
-
Updated
-
-
-
-
Switch to your Jira instance then navigate to Manage Git repositories page and then click Indexing triggers (or alternatively go to Jira Settings ➜ Apps. On the sidebar, click Indexing triggers).
Copy the complete secret key URL mentioned from the paragraph description below the Secret key box.
-
Switch back to Bitbucket (where you left off) and paste this information into the provided URL box.
-
Enter a meaningful Title name for this webhook.
-
For the Triggers, if your organization does not require pull request events, select Repository push. Otherwise, select Choose from a full list of triggers (recommended) and then tick Repository (Push) and Pull Request (Created, Updated).
-
Click Save to complete this setup.
Pull request webhooks
The Git Integration for Jira app supports pull request webhooks now.
For pull request triggers, you will need to have three (3) separate service hooks configuration for it to work properly. See step 9, second option for the webhook triggers.