# GitLab Integration

[GitLab](https://about.gitlab.com/) is a web-based Git repository that provides free open and private repositories, issue-following capabilities, and wikis. It is a complete DevOps platform that includes CI/CD. With the GitLab integration, alerts from failed pipelines, vulnerabilities, or merge-request issues are captured and forwarded to on-call teams via ilert. This ensures engineers are alerted promptly and escalation paths activate, speeding up CI/CD issue remediation.

## In ilert: Create a GitLab alert source

1. Go to **Alert sources** --> **Alert sources** and click on **Create new alert source**

   <figure><img src="/files/rmL9OoRxcWnDwcJZQm4Y" alt=""><figcaption></figcaption></figure>
2. Search for **GitLab** in the search field, click on the GitLab tile and click on **Next**.

   <figure><img src="/files/1WoRRYB5U40PbeMJ7Hit" alt=""><figcaption></figcaption></figure>
3. Give your alert source a name, optionally assign teams and click **Next**.
4. Select an **escalation policy** by creating a new one or assigning an existing one.

   <figure><img src="/files/y4Bakf2apGhBN56U8ZPR" alt=""><figcaption></figcaption></figure>
5. Select you [Alert grouping](/alerting/configure-alerting/alert-sources.md#alert-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.

   <figure><img src="/files/nTlB0ZCIW1SP3dj6P9nO" alt=""><figcaption></figcaption></figure>
6. The next page show additional settings such as customer alert templates or notification prioritiy. Click on **Finish setup** for now.
7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

   <figure><img src="/files/iFF3BpyuIYMi49K1j7uk" alt=""><figcaption></figcaption></figure>

### GitLab advanced settings

{% hint style="info" %}
This setting is optional but we still recommend enabling it for a better user experience.
{% endhint %}

1. Now click on **GitLab Settings** to show the advanced settings

<figure><img src="/files/JWk9AGMNNCpGHSJ2TBDp" alt=""><figcaption></figcaption></figure>

2. You may now choose one of the given **Hook types** which this alert source should process. (Leaving the selection on 'Select' will result the alert source to process all incoming **Hook types**)

<figure><img src="/files/BNFHmy1bkU0cH034tCtM" alt=""><figcaption></figcaption></figure>

3. Some **Hook types** do additionally have a selection for an **Event type**.
4. Click on **Save** to proceed to the next step.

<figure><img src="/files/c0HWr34ulKWdjQXVhfef" alt=""><figcaption></figcaption></figure>

5. On the next page a **GitLab Integration URL** is generated. You will need the URL for the webhook configuration

<figure><img src="/files/otg0wFcgHzktbLeJbUXt" alt=""><figcaption></figcaption></figure>

## In GitLab

1. From your Project Page, navigate to **"Settings"** -> **"Webhooks"**

![](/files/QEj9EEhQEgg9RcE41HEQ)

2. Select the events that should be send to ilert, in this case any **Issues events** or **Confidential issues events** activity will be send to ilert.

![](/files/sSaMkmFGfir0He335oLq)

3. Select "**Add Webhooks**"
4. and if it is added successfully it will be shown at the bottom of the page.

![](/files/3UwOq8gn6NiFXGxdn7IC)

5. Your GitLab integration is set up.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/gitlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
