Using webhooks

GitLab allows you to set up webhooks that will be triggered every time a certain type of event is launched. In this recipe, we will take a look at how you can set up these webhooks yourself and how you can test whether they work without building a complete script around it.

How to do it…

In the following steps, we will configure the webhooks:

  1. Log in to your GitLab instance as a project owner.
  2. Go to the project for which you want to enable webhooks.
  3. Click on Settings.
  4. Click on Web hooks in the left-hand side menu.
  5. Here, you see the form that you can use to set up the webhooks. As we won't be writing a script to catch these events, we will be using a web service that enables us to catch the events.
  6. As we want to have a place to test the webhook ...

Get GitLab Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.