-
-
Notifications
You must be signed in to change notification settings - Fork 34
Setup Webhook
Kim Oliver Drechsel edited this page Aug 5, 2024
·
14 revisions
This page shows how to set up a webhook for your deployments.
A webhook is a http request that is sent to a URL when a specific event occurs.
- Go to your repository settings.
- Click on
Webhooks. - Click on the
Add webhookbutton. - Fill in the following fields:
-
Payload URL: The URL to the app endpoint, e.g.
https://example.com/v1/webhook. -
Content type: Set this to
application/json. -
Secret: The
WEBHOOK_SECRETyou have set in your app configuration (See App Settings). - SSL verification: Enable this if you have a valid SSL certificate for the app endpoint.
-
Which events would you like to trigger this webhook?: Set this to
Just the push eventorLet me select individual eventsand thenPushesand/orBranch or tag creation. - Active: Enable this to activate the webhook.
-
Payload URL: The URL to the app endpoint, e.g.
- Go to your repository settings.
- Click on
Webhooks. - Click on the
Add webhookbutton and selectGiteain the dropdown. - Fill in the following fields:
-
Target URL: The URL to the app endpoint, e.g.
https://example.com/v1/webhook. -
HTTP Method: Set to
POST. -
POST Content Type: Set to
application/json. -
Secret: The
WEBHOOK_SECRETyou have set in your app configuration (See App Settings). -
Trigger On: Set this to
Push EventsorCustom Events...and thenCreateand/orPush. -
Branch filter: Set this to the branch you want to trigger the webhook or
*for all branches. - Active: Enable this to activate the webhook.
-
Target URL: The URL to the app endpoint, e.g.
- Go to your repository settings.
- Click on
Webhooks. - Click on the
Add new webhookbutton. - Fill in the following fields:
-
URL: The URL to the app endpoint, e.g.
https://example.com/v1/webhook. -
Secret Token: The
WEBHOOK_SECRETyou have set in your app configuration (See App Settings). -
Trigger: Set this to
Push eventsand/orTag push events. - SSL verification: Enable this if you have a valid SSL certificate for the app endpoint.
-
URL: The URL to the app endpoint, e.g.
- Click on the
Testbutton and thenPush eventsto test the webhook.