Stitch Documentation
has moved!

Please update your bookmarks to https://www.stitchdata.com/docs

If you're not automatically redirected after 5 seconds, click here.

Connecting GitLab

GitLab Info
This integration was created by Stitch for Singer, an open-source, composable ETL platform. Check out & contribute to the repo on GitHub.

GitLab is currently in Open Beta. The info in this article is subject to change.

Connecting Stitch to GitLab is a four-step process:

  1. Create a Gitlab access token
  2. Add GitLab as a Stitch data source
  3. Define the Historical Sync
  4. Define the Replication Frequency

Prerequisites

Verify that you have access to any projects you want to replicate data from. Stitch is only able to access the same projects as the person who creates the integration.

Creating a Gitlab Access 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.

Adding GitLab as a Stitch Data Source

  1. On the Stitch Dashboard page, click the Add an 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 data warehouse.

    For example, the name “Stitch GitLab” would create a schema called stitch_gitlab in the data warehouse. This schema is where all the tables for this integration will be stored.
  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

Defining the Historical Sync

The Sync Historical Data setting will define the starting date for your GitLab integration. This means that data 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 article.

Defining the Replication Frequency

The Replication Frequency controls how often Stitch will attempt to replicate data from your GitLab integration. By default the frequency is set to 30 minutes, but you can change it to better suit your needs.

Note that the more often GitLab is set to replicate, the higher your row count will be. Even if all the tables in your GitLab integration use Incremental Replication, replicating data frequently will increase your usage.

Stitch & Replicating GitLab Data
Before setting the Replication Frequency, we recommend checking out the structure & Replication Methods for this integration’s tables. Tables that contain nested structures and/or use Full Table Replication will lead to a higher number of replicated rows.

To help prevent overages, we recommend setting the Replication Frequency to something less frequent - like 6 hours instead of 30 minutes.

For more tips on reducing your row count, check out the Reducing Your Row Count article.

After setting the Replication Frequency, click Save Integration to wrap things up.

Related

Was this article helpful?
0 out of 0 found this helpful

Comments

Questions or suggestions? If something in our documentation is unclear, let us know in the comments!