- Code pushed
- Pull request created
- Pull request updated
- Pull request merge attempted
Configure webhook by logging in to your Azure DevOps Server/TFS account:
-
Open a project by clicking on it.
-
On the sidebar, click Project Settings then select Service Hooks. The following screen is displayed.
-
Click Create subscription to add a new service hook subscription.
-
Scroll down to Web Hooks and click to select it.
-
Click Next. The following screen is displayed.
a. Set “code pushed” for the Trigger on this type of event selector.
b. Set all FILTERS to “Any”.
c. Click Next to proceed to the following screen.
-
Switch to your Jira instance then navigate to Git ➜ Manage repositories page and then open Webhooks.
-
Copy the complete Webhook URL by clicking the copy icon adjacent to the right of the URL field.
-
Switch back to your Azure DevOps Server/TFS web portal (where you left off):
a. Paste the webhook URL into the URL field.
b. For the HTTP header, enter
X-GIJ-Microsoft-Event:1
. This header will improve webhook processing efficiency since we are only expecting specific MS events.c. Set Resource details to send to All.
d. Set Messages to send to None.
e. Set Detailed messages to send to None.
The settings 8.d and 8.e limits the data transfered to your Jira instance since too much webhook traffic can degrade Jira performance.
-
Click Test to verify if webhook integration is successful or not.
-
Click Finish to complete this setup.
Pull Request Webhooks
The Git Integration for Jira app supports pull request webhooks now.
You will need to have three (3) separate service hooks configuration for it to work properly. Aside from setting up the “Code pushed” service hook outlined above in step 5.a, perform the same process with Pull request created and Pull request updated for the triggers.
More related articles about webhooks setup
Creating reindex triggers for a single repository
Webhooks GitHub Organization support
Adding webhooks for Azure DevOps Repos | VSTS
Adding webhooks for Azure DevOps Server | TFS (this page)