Integrations

GitLab Integration

Connect GitLab to Koalr for merge request analytics, pipeline data, DORA metrics, and deploy risk scoring — supports GitLab.com and self-hosted instances.

Overview

The GitLab integration brings merge request (MR) data, pipeline events, and push activity into Koalr — giving you the same DORA metrics, PR analytics, flow metrics, and deploy risk scoring available to GitHub-connected teams.

Koalr ingests GitLab data via a system-hook webhook. When an MR is opened, updated, or merged; when a pipeline runs; or when commits are pushed, GitLab sends a signed event to Koalr's webhook receiver. Koalr verifies the signature, resolves the organization, and enqueues the event for processing — typically within seconds.

Both GitLab.com (SaaS) and self-hosted GitLab instances (CE and EE) are supported.

What Koalr syncs

DataSync methodFrequency
Merge requests (open, merged)WebhookReal-time
MR reviews and approvalsWebhookReal-time
Pipeline runs and outcomesWebhookReal-time
Push events (commits)WebhookReal-time
Repository metadataREST backfillOn connect
CI/CD status per MRWebhookReal-time

Backfill on connect: After the webhook is configured, Koalr triggers a one-time REST backfill of the last 90 days of MR and pipeline history so your dashboards populate immediately.

Connecting GitLab

GitLab.com

  1. In Koalr, go to Settings → Integrations.
  2. Click Connect next to GitLab.
  3. Copy the webhook URL and secret token displayed in the dialog.
  4. In GitLab, go to Admin Area → System Hooks (requires GitLab group Owner or Admin).
  5. Paste the webhook URL into the URL field.
  6. Paste the secret token into the Secret token field.
  7. Enable the following trigger checkboxes:
    • Merge request events
    • Pipeline events
    • Push events
  8. Leave SSL verification enabled (recommended) and click Add system hook.
  9. Return to Koalr and click Verify connection.

Koalr sends a test ping and confirms the webhook is receiving events before marking the integration as active.

Self-hosted GitLab

The setup is identical, with one additional step: your GitLab instance must be able to reach Koalr's webhook endpoint over the internet.

Webhook URL for self-hosted: https://api.koalr.com/integrations/gitlab/webhook

If your GitLab instance is behind a corporate firewall or private network, configure an egress rule to allow outbound HTTPS requests to api.koalr.com on port 443.

If your self-hosted instance uses a private CA certificate, disable SSL verification in the system hook settings — or add Koalr's public certificate to your GitLab instance's trusted CA store.

Required permissions

RoleWhere required
GitLab AdminRequired to create System Hooks
Group Owner (fallback)For group-level webhooks (EE only)

GitLab EE note: If you do not have instance-level Admin access, GitLab EE supports group-level webhooks (under Group → Settings → Webhooks) that cover all projects within the group. Use the same URL and token. Group webhooks support merge request and pipeline events but not push events at the group level — push events require individual project webhooks in that case.

Webhook security

Koalr verifies every inbound webhook request using the secret token you provided during setup. The verification uses SHA-256 HMAC with constant-time comparison against the X-Gitlab-Token header — preventing timing attacks. Requests with a missing or invalid token are rejected with a 401 Unauthorized response and never enqueued.

Keep your secret token confidential. If it is ever compromised, disconnect and reconnect the integration from Settings → Integrations → GitLab to rotate to a new token.

Feature availability vs. GitHub

Most Koalr features are fully supported with GitLab. A small number of GitHub-specific features depend on GitHub-native APIs and are not available.

FeatureGitLabGitHub
PR / MR analyticsYesYes
DORA metrics (all 4)YesYes
Deploy risk scoringYesYes
Pipeline / CI statusYesYes
Review queueYesYes
Flow metricsYesYes
Cycle timeYesYes
CODEOWNERS syncNoYes
GitHub Copilot analyticsNoYes
GitHub Check Run (deploy risk gate)NoYes
Deployments API (native)NoYes

CODEOWNERS: GitLab supports CODEOWNERS files, but Koalr's CODEOWNERS sync currently uses the GitHub API. GitLab CODEOWNERS sync is on the roadmap. In the meantime, you can use Custom Metrics to track ownership manually.

Deploy risk gate: On GitHub, Koalr posts a Check Run that can block merges. On GitLab, deploy risk scores are visible in the Koalr dashboard and via the VS Code extension — MR-level gating via GitLab External Status Checks is planned.

Merge request data mapped to Koalr metrics

GitLab MR fieldKoalr metric
created_atPR open time (cycle time start)
merged_atMerge time (cycle time end, DORA lead)
first_commit_atFirst commit time (coding time start)
review_timeTime in review
changes_countPR size (lines changed)
Pipeline statusCI status, change failure rate
Pipeline durationBuild duration trend

Troubleshooting

Events not appearing after webhook setup

Check that the system hook is listed as active in GitLab Admin → System Hooks. Click Test next to the hook and verify GitLab reports a 200 response. If it shows a connection error, confirm api.koalr.com is reachable from your GitLab instance.

"Unauthorized" on test ping

The secret token in GitLab must exactly match the token shown in Koalr's integration dialog (no leading or trailing whitespace). Disconnect and reconnect the integration to generate a fresh token if needed.

MR data missing after backfill

Backfill covers the most recent 90 days of merged MRs and pipeline runs. Data older than 90 days is not backfilled. If your dashboards show less history than expected, confirm that the webhook has been active long enough to capture ongoing activity.

Self-hosted: SSL handshake errors

If your GitLab instance uses a self-signed certificate for its own HTTPS, this does not affect Koalr's webhook receiver (which uses a publicly trusted cert). The SSL verification setting in the system hook controls whether GitLab verifies Koalr's certificate when delivering events. Leave SSL verification enabled unless you are testing on a non-production Koalr endpoint.

Duplicate events

GitLab retries webhook delivery if it does not receive a 200 response within 10 seconds. Koalr's webhook receiver is idempotent — duplicate deliveries of the same event are deduplicated by event ID before processing.