You can create a Gitlab Cloud integration with Flow through either OAuth, or access token. Let’s explore how to create this integration.
Important: We strongly recommend you use a service account to create this integration. Please see this article to learn about creating service accounts.
Git host permission requirements
Flow only requires read access to your repositories. This permission is needed to process the metadata used to generate our reports. In order to use all services (repos, PRs, tickets) and webhooks when integrating with Flow, the service account must be a maintainer or owner at the project/repository level. If you are not interested in enabling webhooks, then the minimum permission needed in GitLab is reporter at the project/repository level.
Connect via OAuth
Connecting via OAuth is the fastest and easiest method to connect your repos.
- Starting on your Flow homepage, go to the top navigation bar and click Settings. Using the left navigation under Integrations, click Integrations.
- Select the Add Integration button in the top right hand corner of your integrations screen.
- On the following page, select GitLab from the Integration Provider list.
- Under the OAuth tab, click Connect to GitLab.
- If you are already logged into your GitLab account, a pop-up will appear, prompting you to confirm access.
Note: If you are not already logged in, you will be prompted to login and authorize the connection.
- If the connection was successful you will see the below message:
- Once you've connected, you may proceed to the Finishing up section of this document to complete the integration process.
Connect via personal access token
To connect via a personal access token, use the Access Token authentication method.
- In GitLab navigate to your Access Tokens page. For information on personal access tokens, and where to find this page, please see Gitlab’s help document.
- On the Personal Access Token page, fill out the following information:
- Name: Give the PAT a unique name so you can identify what it is being used for.
- Expires at: This is optional, but note that if the PAT expires before you update it, Flow will not be able to continue to update and process your data.
- Scopes: The minimum scopes needed are:
- Then click the Create personal access token button at the bottom.
- Copy your access token and paste it into the access token field in Flow, as shown below.
- Click Test connection.
- If the connection was successful you will see the following message:
Once you have a successful connection, you can finalize your integration and begin importing repos.
- Click Next
- On the next screen, select the services you want turned on for this integration. Selecting all three services allows Flow to ingest ticket data, PR data, and repo data. You can turn services “on” and “off” at any time. Click Next.
- Name your integration so you can identify the account. Click Create.
- You have successfully created a new cloud integration!
- From the Groups column on the Repo tab, you can view what groups of repos you’ve given Flow access to. If any groups are missing, double check your GitLab permissions or reach out to support at email@example.com for further assistance.
You can now begin importing repos by clicking the repo import page link.
Learn more about managing integrations on our Help Centre article.
If you need help, please email firstname.lastname@example.org for 24/7 assistance.