Configure webhook by logging in to your GitHub account:
Select a repository.
Go to the Settings page.
On the sidebar under Code and information, click Webhooks.
Click Add webhook. The following page is displayed:
- Paste the obtained Secret URL from the Git Integration for Jira app ➜ Webhooks page into the Payload URL field.
For the Content type, choose application/json. IMPORTANT
Select the Just the push event option as triggering event. This is the default option when creating a new webhook.
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 6.
For the figure above:
pushevent – This is the default configuration and this works only for commits.
everything– This would send commits/pull requests events but is very verbose. We don’t recommend this configuration.
Let me select individual events (
Pull requests) – This would work better than the second option and we recommend this configuration.
Webhooks will be deleted when GitHub integration is disconnected from Git Integration for Jira Server.
More related articles about webhooks setup
Adding webhooks for GitHub (this page)