Configure a Webhook in GitHub
Last updated
Last updated
Follow the instructions below to create a webhook API token from ARM.
Log in to ARM.
Click on the Admin section, then select 'API Token.'
Click on 'Create API Token.'
Enter the token name.
Select Type as "webhook."
Enter a description if required.
Click on 'Create Option.'
Your new API token is created.
Webhooks allow external services to be notified when certain events happen. When the specified events happen, we’ll send a POST request to each of the URLs you provide.
Go to https://github.com/login and sign in to GitHub with your username and password.
Select the related repository you own.
Click on 'Settings' on the right panel.
Then click on 'Webhooks & Services' on the left panel. Click on the 'Add WebHook' Button.
In the URL form field, paste the copied URL or enter the payload URL manually. The payload URL is the URL of the server that will receive the webhook POST requests. Payload URL: <instance_url>/api/webhook/v2/<orgname>/trigger-scm-push-request For example, using instance: https://login.autorabit.com Payload URL: https://login.autorabit.com/api/webhook/v2/autorabit.com/trigger-scm-push-request
Enter the Secret Key generated in ARM as an API token.
Select 'application/json' as the content type. The application/json content type will deliver the JSON payload directly as the body of the POST request.
Select 'Just the push events.' Events are at the core of webhooks. These webhooks fire whenever a certain action is taken on the repository, which your server's payload URL intercepts and acts upon.
Click Add Webhook.
However, to trigger the webhook using pull request, you need to select 'Let me select individual events' and select the Pull requests checkbox.
Click on Add webhook to save the webhook.
In this section, you can select the pattern used to read the comment in a revision associated with your ALM story. For example, 'git commit m [project123] # add README file into the project.'
If you want to configure a webhook in your repository, select the ‘Enable auto update on webhook’ checkbox to reveal the URL required for the webhook settings. For more information on how to configure a webhook in different repositories, refer HERE. You can also choose to sync external smart commits.
/api/webhook/v2/<orgname>/enterprise
/trigger-scm-push-request
/api/webhook/v2/<orgname>/enterprise
/sync-alm-commits