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

# Gitlab Webhook

`POST /webhooks/gitlab`

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.net/sipyourdrink-ltd/apis/bernstein-task-server.md) · [All operations](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sipyourdrink-ltd/bernstein-task-server/versions/86f514b4e920/schema)
