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

Community questions

Was this page useful?

Questions about this page? or post a community question.