# Linking GitLab as a source - Docs

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70)

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d)

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

`npx @posthog/wizard warehouse`

[Learn more](/wizard.md)

![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)

**Alpha release**

This source is currently in **alpha**. The interface and available tables may change.

Sync issues, merge requests, commits, pipelines, and more from a GitLab project into PostHog.

## Adding a data source

1.  Go to the [sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section in PostHog.
2.  Click **\+ New source** and then click **Link** next to GitLab.
3.  Create a personal access token in GitLab under **User settings → Access tokens** with the `read_api` scope. For self-managed GitLab, note your instance URL (for example `https://gitlab.example.com`); for GitLab.com use `https://gitlab.com`. You'll also need the project, given as either a `group/project` path or a numeric project id.
4.  Back in PostHog, set the `GitLab instance URL` (leave it as `https://gitlab.com` for GitLab.com), paste your token into the `Personal access token` field, enter the `Project`, and click **Next**.
5.  Select the tables you want to sync, set the sync method and frequency, then click **Import**.

Once the syncs are complete, you can start using GitLab data in PostHog.

## Available tables

| Table | Description | Sync method |
| --- | --- | --- |
| issues | Issues in the project | Incremental |
| merge_requests | Merge requests in the project | Incremental |
| commits | Repository commits | Incremental |
| pipelines | CI/CD pipelines | Incremental |
| releases | Project releases | Full refresh |
| milestones | Project milestones | Full refresh |
| branches | Repository branches | Full refresh |
| tags | Repository tags | Full refresh |
| labels | Project labels | Full refresh |
| members | Project members | Full refresh |

**Incremental** tables sync only new or updated records on each run. **Full refresh** tables reload all data on each sync.

## Configuration

| Option | Type | Required |
| --- | --- | --- |
| GitLab instance URL | text | No |
| Personal access token | password | Yes |
| Project | text | Yes |

## Supported tables

| Table | Description | Sync method | Incremental field | Primary key |
| --- | --- | --- | --- | --- |
| issues | An issue in the project — a task, bug report, or discussion item. | Incremental, Full refresh | updated_at, created_at | — |
| merge_requests | A request to merge changes from one branch into another in the project. | Incremental, Full refresh | updated_at, created_at | — |
| commits | A commit in the project's repository history. | Incremental, Full refresh | created_at | — |
| pipelines | A CI/CD pipeline run for the project. | Incremental, Full refresh | updated_at | — |
| releases | A published release of the project, tied to a git tag. | Full refresh | — | — |
| milestones | A milestone used to group issues and merge requests toward a goal. | Full refresh | — | — |
| branches | A branch in the project's repository. | Full refresh | — | — |
| tags | A git tag in the project's repository. | Full refresh | — | — |
| labels | A label that can be applied to issues and merge requests to categorize them. | Full refresh | — | — |
| members | A member of the project, including those inherited from ancestor groups. | Full refresh | — | — |

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better