Configuring Webhooks in GitLab
Introduction
Section titled โIntroductionโWebhooks send HTTP POST requests to your services when events like pushes or pipeline updates happen in GitLab.
Add a Webhook
Section titled โAdd a Webhookโ- In your project, go to Settings > Webhooks.
- Enter the URL of the receiving service.
- Select the events to trigger, such as Push events or Merge request events.
- Optionally add a Secret Token for verification.
- Click Add webhook.
Secure the Webhook
Section titled โSecure the Webhookโ- Always use HTTPS endpoints.
- Validate the secret token on the receiving service.
- Restrict the IPs allowed to reach your endpoint if possible.
Common Use Cases
Section titled โCommon Use Casesโ- Trigger external CI systems.
- Send notifications to chat platforms like Slack or Teams.
- Sync repository updates to other systems.