Using system hooks
When you create or delete a user or project, you might want to be notified, or you might have a backend system from which you want to receive notifications for this type of events. GitLab has support for this in the form of system hooks. In this recipe, we take a look at how you can set up system hooks for your GitLab instance.
The following events can trigger a system webhook call:
Project created
Project destroyed
New team member
The team member is removed
A user is created
The user is removed
How to do it…
In the following steps, we will set up the system hooks:
Log in to GitLab as an administrator.
Go to the Admin area section.
Click on Hooks.
As we want to have a place to test the webhook without having to create a lot of software for it, we are going to use a service called
RequestBin
. Go to http://requestb.in and click on Create a RequestBin.Copy the URL that is given on that page, and paste it to GitLab in the hook's URL field.
When you click on Add System Hook, the hook will...