The GitLab extractor pulls raw data from GitLab's REST API and extracts the following resources from GitLab:
- Project milestones
- Project Merge Requests
- Group Milestones
- Group and Project members
- Group Labels
- Project Labels
- Epics (only available for GitLab Ultimate and GitLab.com Gold accounts)
- Epic Issues (only available for GitLab Ultimate and GitLab.com Gold accounts)
For more information you can check the documentation for tap-gitlab.
# GitLab Setup
In order to access your GitLab data, you will need:
- GitLab Instance
- Access Token
- Group OR Project
- Start Date
https://gitlab.comis the default, but if you have a self-hosted GitLab instance please reach out to us
- Full access to GitLab's API requires a personal access token that will authenticate you with the server
The process for getting the access token is very simple:
Navigate to your profile's access tokens.
Fill out the personal access token form with the following properties:
- Name: meltano-gitlab-tutorial
- Expires: leave blank unless you have a specific reason to expire the token
Create personal access tokento submit your request.
You should see your token appear at the top of your screen.
Copy and paste the token into the
Private Tokenfield. It should look something like this:
- Leave empty if you'd like to pull data from a project in a personal user namespace
This property allows you to scope data that the extractor fetches to only the desired group. The group name can generally be found at the root of a repository's URL. If this is left blank, you have to at least provide a project.
https://www.gitlab.com/meltano/tap-gitlab has a group of
meltano. This can be confirmed as well by visiting
https://gitlab.com/meltano and noting the Group ID below the header.
- Space separated paths of projects to pull data from, in
- Leave empty if you've specified one or more groups and would like to pull data from all projects inside these groups
This property allows you to scope the project that the service fetches, but it is completely optional. If this is left blank, the extractor will try to fetch all projects that it can grab.
If you want to configure this, the format for it is
group/project. Here are a couple examples:
meltano/meltano- The core Meltano project
meltano/tap-gitlab- The project for the GitLab Extractor
# Ultimate License
- Pull in extra data (like Epics, Epic Issues and other entities) only available to GitLab Ultimate and GitLab.com Gold accounts.
# Start Date
This property determines how much historical data will be extracted.
Please be aware that the larger the time period and amount of data, the longer the initial extraction can be expected to take.
# Advanced: Command Line Installation
- Navigate to your Meltano project in the terminal
- Run the following command:
meltano add extractor tap-gitlab
If you are successful, you should see
Added and installed extractors 'tap-gitlab' in your terminal.
- Open your project's
.envfile in a text editor
- Add the following variables to your file:
export GITLAB_API_TOKEN="private access token" export GITLAB_API_GROUPS="myorg mygroup" export GITLAB_API_PROJECTS="myorg/repo-a myorg/repo-b" export GITLAB_API_START_DATE="YYYY-MM-DDTHH:MM:SSZ" # e.g. 2019-10-31T00:00:00Z
ultimate_license is true (defaults to false), then the GitLab account used has access to the GitLab Ultimate or GitLab.com Gold features. It will enable fetching Epics, Epic Issues and other entities available for GitLab Ultimate and GitLab.com Gold accounts.
Check the README for details.