GitLab Integration

Add signed approval checks to GitLab merge requests using OAuth and commit statuses.

Key Concepts

The GitLab integration connects your GitLab instance (gitlab.com or self-managed) to SignedApproval via OAuth. When a merge request targets a configured branch, a commit status is created that blocks merging until a human provides cryptographic approval.

GitLab connections, project configs, and commit status mappings are stored in signedapproval_gitlab_connections, signedapproval_gitlab_repo_configs, and signedapproval_gitlab_commit_statuses.

Setup Guide
1

Connect your GitLab account

Go to Dashboard → Settings → Integrations → GitLab and click Connect GitLab. You'll be redirected to GitLab's OAuth authorization page.

Grant SignedApproval the requested permissions (API access for commit statuses and merge requests).

2

Select projects

After connecting, your GitLab projects will be listed. Select which projects require SignedApproval checks and configure per-project settings:

  • Branch patterns — Which target branches require approval
  • Auto-merge — Automatically merge MRs after all approvals are received
  • Quorum — Number of approvals required
3

Configure GitLab merge checks

In GitLab's project settings under Merge requests, enable "Pipelines must succeed" and ensure SignedApproval's external status is included. This prevents merging without a valid approval.

Merge Request Flow

  1. Developer creates or updates a merge request.
  2. GitLab sends a webhook event to SignedApproval.
  3. SignedApproval sets a "pending" commit status on the MR's head SHA.
  4. An approval request is created, and the approver is notified.
  5. The approver authenticates and decides.
  6. The commit status is updated to "success" or "failed".

Self-Managed GitLab

If you run a self-managed GitLab instance, SignedApproval can connect to it as long as your instance is accessible from the internet (for webhooks). Configure the GitLab OAuth application on your instance with the redirect URI pointing to https://signedapproval.net/api/v1/integrations/gitlab/callback.

Note
Like all Git integrations, the commit status resets when new commits are pushed to the merge request. This ensures the approver always reviews the latest code.
Tip
GitLab's "Merge when pipeline succeeds" feature works well with SignedApproval. Set it up so the MR auto-merges as soon as the approval check passes, saving the developer from coming back to click "Merge" manually.