Skip to content

GitLab Token

Connect GitLab repositories using a Personal Access Token.

GitLab does not support App-style integrations in the same way GitHub does, so Kontrua uses a Personal Access Token you create. The token is stored encrypted at rest and never logged.

Create a Personal Access Token

  1. Open GitLab token settings

    In GitLab go to User Settings - Access Tokens (or Group - Settings - Access Tokens for a group token).
  2. Set the required scopes

    Enable api and read_user. Be clear about what the api scope grants: it is read and write on your project. Kontrua uses it to read merge request details and the file tree, post notes and commit statuses, create a branch and commit to it, and open merge requests. It never commits to your default branch and it never merges. Every change reaches you as a merge request, or as a commit on the merge request branch you pointed Kontrua at.
  3. Enter the token in Kontrua

    Go to Dashboard - Settings - Integrations - Connect GitLab and paste the token. Kontrua will verify it and sync your accessible projects.

Set up the webhook

After connecting the token, Kontrua generates a unique webhook URL and secret for each repository. You need to register this webhook in your GitLab project settings.

  1. Open the repo in the Kontrua dashboard

    Find the repository and open the Integration tab. Copy the webhook URL and secret shown there.
  2. Add the webhook in GitLab

    In your GitLab project go to Settings - Webhooks. Paste the URL and secret, enable the Merge request events trigger, and save.
Kontrua acts on two merge request actions, and no others. Approved starts a correction run, if the merge request targets your watch branch. Open, reopen and an update that carries a new head run the free verdict on that merge request. Everything else GitLab sends - closed, merged, label, milestone and assignee changes, and description edits that move no commit - is received and ignored. Push events are ignored too: on GitLab the verdict follows merge requests.

Self-hosted GitLab

If you run a self-hosted GitLab instance, set the instance URL in Dashboard - Settings - Integrations before connecting your token. All API calls and webhook events will be routed through your instance.

Ready to prove your context is true?

Connect your first repository and Kontrua tells you how much of what your docs claim is still true, before it writes anything.