GitLab integration summary

Stitch’s GitLab integration replicates data using the GitLab REST API. Refer to the Schema section for a list of objects available for replication.

GitLab feature snapshot

A high-level look at Stitch's GitLab integration, including release status, useful links, and the features supported in Stitch.

STITCH
Release Status

Released

Supported By

Singer Community

Stitch Plan

Free

Singer GitHub Repository

GitLab Repository

DATA SELECTION
Table Selection

Unsupported

Column Selection

Unsupported

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Unsupported

Table-level Reset

Unsupported

Configurable Replication Methods

Unsupported

TRANSPARENCY
Extraction Logs

Supported

Loading Reports

Supported

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. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the GitLab icon.

  4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard 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.

  5. In the API URL field, enter https://gitlab.com/api/v3
  6. In the Private Token field, paste the Personal Access Token you created in the previous section.
  7. 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 replicate data beyond GitLab’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.

Step 4: Create a replication schedule

In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

GitLab integrations support the following replication scheduling methods:

To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.

Initial and historical replication jobs

After you finish setting up GitLab, its Sync Status may 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.

Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.


GitLab table schemas

Replication Method :

Key-based Incremental

Replication Key :

projects.last_activity_at

Primary Key :

project_id : name

API endpoint :

listRepositoryBranches

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

Note: To replicate branch data, you must set this table and the projects table to replicate. 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.

Reference:

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.

Reference:


Replication Method :

Key-based Incremental

Replication Key :

projects.last_activity_at

Primary Key :

id

API endpoint :

listRepositoryCommits

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

Note: To replicate commit data, you must set this table and the projects table to replicate. Data for this table will only be replicated when the associated project (in the projects table) is also updated.

id
STRING

The commit ID.

Reference:

created_at
DATE-TIME

The time the commit was created.

project_id
INTEGER

The ID of the project associated with the commit.

Reference:

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 :

Key-based 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.

Reference:

updated_at
DATE-TIME

The time the issue was last updated.

project_id
INTEGER

The ID of the project associated with the issue.

Reference:

milestone_id
INTEGER

The ID of the milestone associated with the issue.

Reference:

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
ARRAY

A list of labels applied to the issue.

value
STRING

The name of the label.

issues (table), labels (attribute)

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 :

Key-based Incremental

Replication Key :

updated_at

Primary Key :

id

API endpoint :

listProjectMilestones

The milestones table contains info about project milestones.

Note: To replicate milestone data, you must set this table and the projects table to replicate. Data for this table will only be replicated when the associated project (in the projects table) is also updated.

id
INTEGER

The milestone ID.

Reference:

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.

Reference:

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 :

Key-based 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.

Reference:

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.

Reference:

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
OBJECT

Details about the namespace the project is associated with.

id
INTEGER

The namespace ID.

kind
STRING

The kind of namespace. Ex: group

name
STRING

The name of the namespace.

path
STRING

The path of the namespace.

projects (table), namespace (attribute)

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
OBJECT

Details about the group and project-level permissions associated with the project.

group_access
OBJECT

Details about the group access permissions associated with the project.

access_level
INTEGER

The group’s access level.

notification_level
INTEGER

The group’s notification level.

projects (table), group_access (attribute)

project_access
OBJECT

Details about the access permissions associated with the project.

access_level
INTEGER

The access level for the project.

notification_level
INTEGER

The notification level for the project.

projects (table), project_access (attribute)
projects (table), permissions (attribute)

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
ARRAY

Details about groups the project has been shared with.

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.

projects (table), shared_with_groups (attribute)

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
ARRAY

A list of tags applied to the project.

value
STRING

The name of the tag.

projects (table), tag_list (attribute)

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

Primary Key :

id

API endpoint :

listUsers

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

id
INTEGER

The user ID.

Reference:

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.