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

  1. Go to the sources tab 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

TableDescriptionSync method
issuesIssues in the projectIncremental
merge_requestsMerge requests in the projectIncremental
commitsRepository commitsIncremental
pipelinesCI/CD pipelinesIncremental
releasesProject releasesFull refresh
milestonesProject milestonesFull refresh
branchesRepository branchesFull refresh
tagsRepository tagsFull refresh
labelsProject labelsFull refresh
membersProject membersFull refresh

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

Configuration

OptionTypeRequired
GitLab instance URLtextNo
Personal access tokenpasswordYes
ProjecttextYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
issues

An issue in the project — a task, bug report, or discussion item.

Incremental, Full refreshupdated_at, created_at
merge_requests

A request to merge changes from one branch into another in the project.

Incremental, Full refreshupdated_at, created_at
commits

A commit in the project's repository history.

Incremental, Full refreshcreated_at
pipelines

A CI/CD pipeline run for the project.

Incremental, Full refreshupdated_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

Was this page useful?

Questions about this page? or post a community question.