GitLab webhook
POST /api/webhook/gitlab
Receives GitLab webhook events.
Signature validation
GitLab sends the webhook secret as theX-Gitlab-Token header. The server compares this value against the webhookSecret stored in the matching platform config. Requests with a missing or invalid token receive 401 Unauthorized.
Supported events
| GitLab event | object_kind | Triggering actions |
|---|---|---|
| Merge Request | merge_request | open, update, reopen |
| Note (comment) | note | Any MR comment matching the review command |
update events that only change assignees or reviewers are silently ignored to prevent unnecessary review re-runs.Review command
Posting a recognized review command (e.g.,/review) as a comment on a merge request triggers a manual review from the webhook, even when auto-review is disabled for the project.
Auto-assignment
Onopen and reopen events, the server automatically assigns the MR author as assignee and applies any configured default reviewers if the project has autoAssignAuthor or defaultReviewerIds set.
Example curl
Response
200 OK — Event received and processed (or intentionally ignored).
Always
true on a 200 response.Human-readable status message.
401 Unauthorized — Missing or invalid X-Gitlab-Token.
400 Bad Request — Unrecognized event format or missing required fields.
500 Internal Server Error — Review task could not be queued.
GitHub webhook
POST /api/webhook/github
Receives GitHub webhook events.
Signature validation
GitHub signs each payload with HMAC-SHA256 and sends the signature as theX-Hub-Signature-256 header. The server verifies this signature against the webhookSecret in each GitHub platform config until a match is found. Requests that fail all verifications receive 401 Unauthorized.
Required headers
| Header | Description |
|---|---|
X-Hub-Signature-256 | HMAC-SHA256 signature of the payload body |
X-GitHub-Event | GitHub event type (e.g., pull_request, issue_comment) |
Content-Type | Must be application/json |
Supported events
| GitHub event | Triggering actions |
|---|---|
pull_request | opened, synchronize, reopened |
issue_comment / pull_request_review_comment | Comments matching the review command |
Example curl
Response
200 OK — Event received and processed (or intentionally ignored).
Always
true on a 200 response.Human-readable status message.
401 Unauthorized — Missing signature or HMAC verification failed.
400 Bad Request — Missing X-GitHub-Event header or unrecognized payload.
404 Not Found — No GitHub platform config found.
500 Internal Server Error — Review task could not be queued.
What happens after a webhook is received
- The payload signature / token is validated against the stored platform config.
- The platform project ID is looked up in the database.
- The project’s review settings are checked (enabled, auto-review, AI config).
- A review task is queued in the task queue.
- If a runner is available, it claims the task and begins execution.
- Upon completion, comments are posted back to the platform and notifications are dispatched.