GitLab Token

Connect GitLab repositories using a Personal Access Token.

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

Create a Personal Access Token

  1. 1

    Open GitLab token settings

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

    Set the required scopes

    Enable api and read_user. The api scope allows reading merge request details and posting notes. No write access to your source code is requested.
  3. 3

    Enter the token in Pith

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

Set up the webhook

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

  1. 1

    Open the repo in the Pith dashboard

    Find the repository and open the Integration tab. Copy the webhook URL and secret shown there.
  2. 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.
Pith only acts on merge request approved events. Other merge request events (opened, closed, merged) are received but ignored.

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 stop writing docs by hand?

Connect your first repository and Pith will handle the rest.