---
title: "Gitlab Webhook"
method: POST
path: "/webhooks/gitlab"
---

# Gitlab Webhook

`POST /webhooks/gitlab`

## Request

- Base URL: `http://127.0.0.1:8052`
- URL: `http://127.0.0.1:8052/webhooks/gitlab`
- Auth: none declared

Receive a GitLab CI webhook, verify token, and create ci-fix tasks.

Handles the following event types:
- ``pipeline`` (failed) - creates a ci-fix task, capped at
  ``MAX_CI_RETRIES`` active attempts per branch.
- ``job`` (failed) - creates a ci-fix task for the specific job.

Reads ``GITLAB_WEBHOOK_TOKEN`` from environment. GitLab sends a simple
plaintext token in the ``x-gitlab-token`` header.
Returns 200 on success, 401 on bad/missing token.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/bernstein/apis/bernstein-task-server.md) · [All operations](https://skmtc.dev/bernstein/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc.dev/bernstein/apis/bernstein-task-server/revisions/2a20a34ad2eb?raw)
