Supported webhook events:
- Pushes
- Pull requests
Setup webhooks for GitHub
Configure webhooks by logging in to your GitHub account:
-
Select a repository.
-
Go to the Settings tab.
-
On the sidebar, select Webhooks.
-
Click Add webhook. The following page is displayed.
-
Paste the obtained Secret URL from the Git Integration for Jira app ➜ Indexing triggers page into the Payload URL field.
- Set the Content type to application/json.
- Enter the Secret key into the Secret field.
-
Select the Just the push event option as triggering event. This is the default option when creating a new webhook.
Leave the Active setting as is. Deactivating this option will stop sending event triggers from the selected repository.
-
Click Add webhook to save the new webhook settings.
Pull request event webhook
The Git Integration for Jira app supports GitHub pull request webhooks now.
You will need to enable two (2) event triggers in your GitHub webhooks configuration (Repo ➜ Settings ➜ Webhooks) for it to work properly. Under event triggers section, choose Let me select individual events and then select both “Pushes” and “Pull request” triggers instead as outlined above in step 7.
For the figure above:
-
Just the
push
event – This is the default configuration and this works only for commits. -
Send me
everything
– This would send commits/pull requests events but is very verbose. We don’t recommend this configuration. -
Let me select individual events (
Pushes
/Pull requests
) – This would work better than the second option and we recommend this configuration.
Indexing triggers will be automatically registered for each GitHub repository connected to Jira Cloud to instantly index your commits. For this to work, the connecting GitHub user must be the Organization Owner or have repository ADMIN rights.