Skip to content

GitHub and GitLab Integration

Fresh

How to connect Greptile with GitHub and GitLab for automated code reviews

Overview

Greptile integrates with GitHub and GitLab to provide automated code reviews on your pull requests and merge requests. The setup process differs between the two platforms.

Note

GitHub, GitLab, and GitHub Enterprise Server are supported (email hello@greptile.com for GHES access)


GitHub Integration

GitHub integration uses the Greptile Apps GitHub App, which handles authentication and permissions automatically.

Setup

You'll be guided through GitHub App installation during onboarding. The process includes:

  1. Installing the GitHub App - You'll be redirected to GitHub to authorize the Greptile Apps installation
  2. Granting repository access - Select which repositories Greptile can access:
    • All repositories - Grant access to all current and future repos
    • Select repositories - Choose specific repos to enable
  3. Configuring reviews - Select which repositories to actively review at app.greptile.com/review/github

Managing Your Installation

After initial setup, you can manage your GitHub integration:

  • Modify repository access: Visit github.com/apps/greptile-apps to add/remove repository permissions
  • Configure review settings: Go to app.greptile.com/review/github to enable/disable reviews per repository

All Greptile actions (comments, reviews, reactions) are performed as the GitHub App.


GitLab Integration

You'll be guided through GitLab integration during onboarding. The setup requires a group access token and webhook configuration for automatic reviews.

Prerequisites

Ensure HTTP(S) git access is enabled for your GitLab group:

  1. Navigate to your GitLab group
  2. Go to Settings → General → Permissions and group features
  3. Under Enabled git access protocols, select Both SSH and HTTP(S) or Only HTTP(S)

Authentication Setup

Create Group Access Token

Create a **group access token** to grant Greptile access to all repositories in your group.

1. Navigate to your GitLab group
2. Go to **Settings → Access Tokens**
3. Create a new token with:
   * **Name**: `Greptile` (or your preferred name)
   * **Role**: `Developer`
   * **Scopes**: `api`
   * **Expiration**: Set to maximum (1 year)
4. Copy the token immediately - you won't be able to see it again

Add Token to Greptile Dashboard

You'll be prompted to add your token during onboarding. You can update it later at app.greptile.com/connections/code-providers.

Webhook Configuration

Webhooks enable automatic code reviews when merge requests are opened or updated. Without webhooks, you can still trigger reviews manually.

We recommend setting up webhooks at the group level to apply to all repositories in the group.

Get Webhook Details

Retrieve your webhook URL and secret from the Greptile dashboard:

1. Go to app.greptile.com/review/gitlab
2. Copy the **webhook secret** displayed on the page (unique to your Greptile organization - do not share)
3. Note the webhook URL: `https://talon.greptile.com/webhook`

Note

  You can retrieve your webhook secret anytime by clicking the gear icon at app.greptile.com/review/gitlab

Configure GitLab Webhook

Set up the webhook in your GitLab group:

1. Navigate to your GitLab group

2. Go to **Settings → Webhooks**

3. Add a new webhook with:

   * **URL**: `https://talon.greptile.com/webhook`
   * **Secret Token**: Paste the secret from Greptile dashboard
   * **Trigger events**: Enable the following:
     * **Comments**
     * **Issue events**
     * **Merge request events**
     * **Emoji events**
   * **Enable SSL verification**: Recommended

4. Click **Add webhook**

Source

Mirrored from the official Greptile documentation. Self-contained reference copy.