> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting up a GitLab Group Hook

We rely on a GitLab Group Hook to enable:

1. **Syncing changes to follow-ups in GitLab back to incident.io**

2. **Linking merge requests to incidents automatically** when you mention the incident reference (e.g. `INC-123`) in a merge request.

3. **Posting updates to merge requests in the incident channel**, for example when a linked MR is merged.

## Setting up

<Warning>
  You'll need a GitLab Group Owner to do this setup.
</Warning>

#### 1. Find your secret token

Under [Settings → Integrations → GitLab](https://app.incident.io/~/settings/integrations/gitlab), you'll find a unique secret token. Copy this down - you'll need it to successfully configure the hook.

<img src="https://mintcdn.com/incidentio-18bb4170/3405jn_jWz4xmTr-/images/help-centre/setting-up-a-gitlab-group-hook/screenshot-1.png?fit=max&auto=format&n=3405jn_jWz4xmTr-&q=85&s=7da9c4184eab7970a19710fe6af8fd9f" alt="" width="2512" height="1686" data-path="images/help-centre/setting-up-a-gitlab-group-hook/screenshot-1.png" />

#### 2. Create the hook

Within your top-level group, click **Settings** then **Webhooks** :

<img src="https://mintcdn.com/incidentio-18bb4170/3405jn_jWz4xmTr-/images/help-centre/setting-up-a-gitlab-group-hook/screenshot-2.png?fit=max&auto=format&n=3405jn_jWz4xmTr-&q=85&s=0ec832b6b7b2cdfdcd632c8b2d447ec1" alt="" width="2512" height="1686" data-path="images/help-centre/setting-up-a-gitlab-group-hook/screenshot-2.png" />

Then ' **Add new webhook** '.

For the **URL** use `https://app.incident.io/webhooks/gitlab`.

For the **Secret token**, paste in the secret token from the incident.io dashboard.

Under **Trigger**, select:

**Work item events** (or **Issues events** on older GitLab versions — the screenshot below shows the older label)

**Merge request events**

<img src="https://mintcdn.com/incidentio-18bb4170/3405jn_jWz4xmTr-/images/help-centre/setting-up-a-gitlab-group-hook/screenshot-3.png?fit=max&auto=format&n=3405jn_jWz4xmTr-&q=85&s=c811a1f3d6d27c542e296fb0b1c3d570" alt="" width="2512" height="1686" data-path="images/help-centre/setting-up-a-gitlab-group-hook/screenshot-3.png" />

Everything else can be left as the default. Click **Add webhook**.

#### 3. Verify the connection

In [Settings → Integrations → GitLab](https://app.incident.io/~/settings/integrations/gitlab), you can see when the last webhook was received. Make a small change to an issue to trigger a webhook:

<img src="https://mintcdn.com/incidentio-18bb4170/3405jn_jWz4xmTr-/images/help-centre/setting-up-a-gitlab-group-hook/screenshot-4.png?fit=max&auto=format&n=3405jn_jWz4xmTr-&q=85&s=41de0b99f58d9af42d1a5bf675571673" alt="" width="2512" height="1686" data-path="images/help-centre/setting-up-a-gitlab-group-hook/screenshot-4.png" />

**You're all set**
