Linking GitLab as a source
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
- Go to the sources tab of the data pipeline section in PostHog.
- Click + New source and then click Link next to GitLab.
- Create a personal access token in GitLab under User settings → Access tokens with the
read_apiscope. For self-managed GitLab, note your instance URL (for examplehttps://gitlab.example.com); for GitLab.com usehttps://gitlab.com. You'll also need the project, given as either agroup/projectpath or a numeric project id. - Back in PostHog, set the
GitLab instance URL(leave it ashttps://gitlab.comfor GitLab.com), paste your token into thePersonal access tokenfield, enter theProject, and click Next. - 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 |