Release Status Released Supported By Singer community
Availability Free Status Page GitLab Status Page
Default Historical Sync 1 year Default Replication Frequency 30 minutes
Whitelisting Unsupported Destination Incompatibilities None

Connecting GitLab

GitLab Setup Requirements

To set up GitLab in Stitch, you need:

  • Access to any projects you want to replicate data from. Stitch will only be able to access the same projects as the user who creates the integration.

Step 1: Create a GitLab token

  1. Sign into your GitLab account.
  2. Click the user menu (your icon) > Settings.
  3. Click the Access Tokens tab.
  4. In the Name field, enter Stitch. This will allow you to easily identify what application is using the token.
  5. In the Scopes section, check the api box. This will allow Stitch to access your API and replicate your GitLab data.
  6. Click Create Personal Access Token.
  7. The new Access Token will display at the top of the page. Copy the token before navigating away from the page - GitLab won’t display it again.

Step 2: Add GitLab as a Stitch Data Source

  1. On the Stitch Dashboard page, click the Add Integration button.

  2. Click the GitLab icon.

  3. Enter a name for the integration. This is the name that will display on the for the integration; it’ll also be used to create the schema in your destination.

    For example, the name “Stitch GitLab” would create a schema called stitch_gitlab in the destination. Note: Schema names cannot be changed after you save the integration.

  4. In the API URL field, enter https://gitlab.com/api/v3
  5. In the Private Token field, paste the Personal Access Token you created in the previous section.
  6. In the Projects to Track field, enter the projects you want to track separated by spaces.

    For example: in an organization named stitch, there are two projects to track: stitch-data and stitch-docs. To track them, you’d enter them like this: stitch/stitch-data stitch/stitch-docs

Step 3: Define the Historical Sync

The Sync Historical Data setting will define the starting date for your GitLab integration. This means that:

  • For tables using Incremental Replication, data equal to or newer than this date will be replicated to your data warehouse.
  • For tables using Full Table Replication, all data - including records that are older, equal to, or newer than this date - will be replicated to your data warehouse.

Change this setting if you want to sync data beyond GitLab’s default setting of 1 year. For a detailed look at historical syncs, check out the Syncing Historical SaaS Data guide.

Step 4: Define Replication Frequency

The Replication Frequency controls how often Stitch will attempt to extract data from your GitLab integration.

Note: This setting only affects the frequency of data extraction from GitLab, not the interval at which data is loaded into your data warehouse. For example: a one (1) minute Replication Frequency means Stitch will attempt to extract data every minute, but loading the extracted data may take longer than this.

Use the Default Frequency

To use the default Replication Frequency (30 minutes), leave the Use integration default box checked and click Check and Save to create the integration.

Customize the Frequency

To adjust the Replication Frequency:

  1. Uncheck the Use integration default checkbox. A slider with various frequencies will display.
  2. Click the desired frequency on the slider.
  3. Click Check and Save to create the integration.

To help prevent overages, consider setting the integration to replicate less frequently. See the Understanding & Reducing Your Row Usage guide for tips on reducing your usage.

GitLab’s Intial Replication Job

After you finish setting up GitLab, you might see its Sync Status show as Pending on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.


GitLab Table Schemas

Replication Method: Incremental Replication Key : n/a
Primary Key : project_id : name API Endpoint: listRepositoryBranches

The branches table contains high-level info about repository branches in your projects.

branches & Incremental Replication

Data for this table will only be replicated when the associated project (in the projects table) is also updated.

project_id
INTEGER

The ID of the project associated with the branch.

name
STRING

The name of the branch.

merged
BOOLEAN

Indicates if the branch has been merged.

protected
BOOLEAN

Indicates if the branch is protected.

developers_can_push
BOOLEAN

Indicates if developers can push to the branch.

developers_can_merge
BOOLEAN

Indicates if developers can merge.

commit_id
STRING

The ID of the commit.


Replication Method: Incremental Replication Key : n/a
Primary Key : id API Endpoint: listRepositoryCommits

The commits table contains info about repository commits in a project.

commits & Incremental Replication

Data for this table will only be replicated when the associated project (in the projects table) is also updated.

id
STRING

The commit ID.

created_at
DATE-TIME

The time the commit was created.

project_id
INTEGER

The ID of the project associated with the commit.

short_id
STRING

The short ID of the commit.

title
STRING

The title of the commit.

author_name
STRING

The name of the commit’s author.

author_email
STRING

The email of the commit’s author.

committer_name
STRING

The name of the committer.

committer_email
STRING

The email address of the committer.

message
STRING

The commit message.

allow_failure
BOOLEAN

Indicates if failures are allowed.


Replication Method: Incremental Replication Key : updated_at
Primary Key : id API Endpoint: listProjectIssues

The issues table contains info about issues contained within projects.

id
INTEGER

The issue ID.

updated_at
DATE-TIME

The time the issue was last updated.

project_id
INTEGER

The ID of the project associated with the issue.

milestone_id
INTEGER

The ID of the milestone associated with the issue.

author_id
INTEGER

The ID of the issue’s author.

assignee_id
INTEGER

The ID of the user who is assigned to the issue.

description
STRING

The issue’s description.

state
STRING

The state of the issue. Possible values are opened or closed.

iid
INTEGER

The IID of the issue.

labels

A list of labels applied to the issue.

This data may be de-nested into a subtable if your data warehouse doesn't natively support nested data.

This subtable would be named issues__labels and may contain the following attributes:

_sdc_source_key_id
INTEGER

The issue ID.

_sdc_level_0_id
INTEGER

This column forms part of a composite key for the table. The value will auto-increment for each unique record, beginning with 0.

value
STRING

The name of the label.

title
STRING

The title of the issue.

created_at
DATE-TIME

The time the issue was created.

subscribed
BOOLEAN

Indicates if the authenticating user (the user who created the integration in Stitch) is subscribed to the issue.

user_notes_count
INTEGER

The count of notes in the issue.

due_date
STRING

The date the issue is due by.

web_url
STRING

The URL of the issue.

confidential
BOOLEAN

Indicates if the issue is confidential.


Replication Method: Incremental Replication Key : updated_at
Primary Key : id API Endpoint: listProjectMilestones

The milestones table contains info about project milestones.

milestones & Incremental Replication

Data for this table will only be replicated when the associated project (in the projects table) is also updated.

id
INTEGER

The milestone ID.

updated_at
DATE-TIME

The time the milestone was last updated.

iid
INTEGER

The IID of the milestone.

project_id
INTEGER

The ID of the project the milestone is associated with.

title
STRING

The title of the milestone.

description
STRING

The description of the milestone.

due_date
STRING

The date the milestone is due by.

start_date
STRING

The start date of the milestone.

state
STRING

The state of the milestone. Possible values are active and closed.

created_at
DATE-TIME

The time the milestone was created.


Replication Method: Incremental Replication Key : last_activity_at
Primary Key : id API Endpoint: listAllProjects

The projects table contains info about specific projects.

id
INTEGER

The project ID.

last_activity_at
DATE-TIME

The time of the last activity associated with the project.

approvals_before_merge
INTEGER

The number of users who should approve merge requests by default.

archived
BOOLEAN

Indicates if the project has been archived.

avatar_url
STRING

The URL of the avatar associated with the project.

builds_enabled
BOOLEAN

Indicates if build are enabled for the project.

container_registry_enabled
BOOLEAN

Indicates if the container registry is enabled for the project.

created_at
DATE-TIME

The time the project was created.

creator_id
INTEGER

The ID of the user who created the project.

default_branch
STRING

The name of the project’s default branch.

description
STRING

The project’s description.

forks_count
INTEGER

The total number of forks associated with the project.

http_url_to_repo
STRING

The http URL to the project’s repository.

issues_enabled
BOOLEAN

Indicates if issues are enabled for the project.

lfs_enabled
BOOLEAN

Indicates if LFS is enabled for the project.

merge_requests_enabled
BOOLEAN

Indicates if merge requests are enabled for the project.

name
STRING

The name of the project.

name_with_namespace
STRING

The namespace of the project and the project name, e.g. namespace/project_name

namespace__id
INTEGER

The namespace ID.

namespace__kind
STRING

The kind of namespace. Ex: group

namespace__name
STRING

The name of the namespace.

namespace__path
STRING

The path of the namespace.

only_allow_merge_if_all_discussions_are_resolved
BOOLEAN

Indicates if merge requests can only be merged when all discussions are resolved.

only_allow_merge_if_build_succeeds
BOOLEAN

Indicates if merges are allowed only if builds succeed.

open_issues_count
INTEGER

The total number of open issues.

owner_id
INTEGER

The ID of the project’s owner.

path
STRING

The path of the project.

path_with_namespace
STRING

The project’s path with the namespace, e.g. project_path/project_namespace

permissions__group_access__access_level
INTEGER

The group’s access level.

permissions__group_access__notification_level
INTEGER

The group’s notification level.

permissions__project_access__access_level
INTEGER

The access level for the project.

permissions__project_access__notification_level
INTEGER

The notification level for the project.

public
BOOLEAN

Indicates if the project is public.

public_builds
BOOLEAN

Indicates if builds are public for the project.

request_access_enabled
BOOLEAN

Indicates if request access is enabled.

shared_runners_enabled
BOOLEAN

Indicates if shared runners are enabled for the project.

shared_with_groups

Details about groups the project has been shared with.

This data may be de-nested into a subtable if your data warehouse doesn't natively support nested data.

This subtable would be named projects__shared_with_groups and may contain the following attributes:

_sdc_source_key_id
INTEGER

The project ID.

_sdc_level_0_id
INTEGER

This column forms part of a composite key for the table. The value will auto-increment for each unique record, beginning with 0.

group_id
INTEGER

The ID of the group the project was shared with.

group_name
STRING

The name of the group the project was shared with.

group_access_level
INTEGER

The access level of the group the project was shared with.

snippets_enabled
BOOLEAN

Indicates if snippets are enabled for the project.

ssh_url_to_repo
STRING

The SSH URL of the project’s repository.

star_count
INTEGER

The total number of stars for the project.

tag_list

A list of tags applied to the project.

This data may be de-nested into a subtable if your data warehouse doesn't natively support nested data.

This subtable would be named projects__tag_list and may contain the following attributes:

_sdc_source_key_id
INTEGER

The project ID.

_sdc_level_0_id
INTEGER

This column forms part of a composite key for the table. The value will auto-increment for each unique record, beginning with 0.

value
STRING

The name of the tag.

visibility_level
INTEGER

The visibility level for the project.

web_url
STRING

The URL of the project.

wiki_enabled
BOOLEAN

Indicates if the wiki is enabled for the project.


Replication Method: Full Table API Endpoint: listUsers
Primary Key : id

The users table contains info about the users in your GitLab account.

id
INTEGER

The user ID.

username
STRING

The user’s username.

name
STRING

The user’s name.

state
STRING

The user’s current state. Ex: active

avatar_url
STRING

The URL of the user’s avatar.

web_url
STRING

The URL of the user’s profile.



Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.