GitLab
Connect GitLab projects to OpenAnalyst to analyze merge requests, pipelines, issues, and CI/CD performance. Supports both GitLab.com and self-hosted GitLab instances.
Connecting GitLab
OpenAnalyst connects to GitLab using personal access tokens or OAuth. Both GitLab.com (cloud) and self-hosted GitLab instances are supported. Self-hosted GitLab is available on Max and Enterprise plans.
Connecting GitLab.com via OAuth
- In the sidebar, navigate to Integrations.
- Find GitLab in the integrations list and click Connect.
- Select GitLab.com (OAuth) as the connection method.
- You will be redirected to GitLab to authorize OpenAnalyst. Click Authorize.
- After authorization, select the groups and projects you want to analyze and click Save configuration.
Connecting Self-Hosted GitLab via Access Token
- In your GitLab instance, go to your user profile and navigate to Preferences > Access Tokens.
- Create a new personal access token with the following scopes:
read_api,read_user,read_repository. - Copy the token value — it is only shown once.
- In OpenAnalyst Integrations, choose GitLab (Self-Hosted) and enter your GitLab instance URL (for example,
https://gitlab.yourcompany.com) and the access token. - Click Test connection to verify, then click Save.
Warning: Store your GitLab access token securely. If the token is compromised, revoke it immediately from your GitLab profile and generate a new one, then update the connection in OpenAnalyst.
Analyzing GitLab Data
After connecting, OpenAnalyst syncs data from your selected GitLab projects. The following data types are available for analysis:
| Data Type | Description |
|---|---|
| Merge Requests | MR status, creation and merge timestamps, reviewers, approval status, and source/target branches. |
| Pipelines | Pipeline runs, status (success/failed/cancelled), duration, and triggering event. |
| Jobs | Individual CI/CD job results, duration, stage, and runner assignment. |
| Issues | Open/closed issues, labels, milestone assignment, time estimates, and time-to-close. |
| Commits | Commit history with author, message, timestamp, and changed files. |
| Contributors | Activity per contributor including commit count, MR authorship, and code review participation. |
All synced data is available in the Data Explorer and the AI Chat interface. Example natural-language queries you can ask:
- "What is our average pipeline duration trend over the past 60 days?"
- "Which pipelines failed most frequently last week and in which stage?"
- "Show me merge request cycle time by project for this quarter."
CI/CD Pipeline Analytics
GitLab CI/CD pipeline data is one of the most powerful aspects of the OpenAnalyst GitLab integration. The platform tracks every pipeline run and surfaces metrics such as:
- Pipeline success rate — Percentage of successful pipelines over time, broken down by branch or project.
- Average duration — How long pipelines take to complete, with trend analysis to detect slowdowns.
- Failure hotspots — Which jobs or stages fail most often, helping teams prioritize reliability improvements.
- Queue time — Time jobs spend waiting for available runners, useful for capacity planning.
- Flaky job detection — Jobs that intermittently fail and succeed without code changes are flagged for investigation.
Pre-built CI/CD analytics dashboard templates are available under Dashboards > New Dashboard > From Template > GitLab.
Self-Hosted GitLab Support
OpenAnalyst fully supports self-hosted GitLab instances (GitLab CE and EE) running version 14.0 or later. When connecting a self-hosted instance:
- Ensure the GitLab instance is reachable from the internet or configure a network tunnel. OpenAnalyst connects outbound to your instance's API endpoint.
- If your instance uses a self-signed TLS certificate, contact OpenAnalyst support to whitelist the certificate fingerprint.
- For instances behind a VPN, use the OpenAnalyst agent (available on Enterprise plans) which can be deployed on-premises to proxy API calls securely.
Note: Self-hosted GitLab connectivity requires the Max or Enterprise plan. If you are on a lower plan and need this feature, consider upgrading or contacting the OpenAnalyst sales team for a trial.
Setting Up Access Tokens
For long-running integrations, OpenAnalyst recommends creating a dedicated service account in GitLab rather than using a personal access token tied to an individual user. This prevents the integration from breaking if the individual's account is deactivated.
- Create a new GitLab user account for the OpenAnalyst service (for example,
openanalyst-bot). - Add the service account to each project you want to analyze with at least Reporter role access.
- Log in as the service account and create a personal access token with
read_apiscope. - Use this token when configuring the OpenAnalyst integration.
Alternatively, if your GitLab instance supports group access tokens (GitLab 15.7+), you can create a group access token scoped to an entire group rather than managing project-level access individually:
# GitLab API: Create group access token
curl -X POST "https://gitlab.yourcompany.com/api/v4/groups/YOUR_GROUP_ID/access_tokens" \
-H "PRIVATE-TOKEN: your_admin_token" \
-H "Content-Type: application/json" \
-d '{
"name": "OpenAnalyst Integration",
"scopes": ["read_api", "read_repository"],
"access_level": 20,
"expires_at": "2026-12-31"
}'Tip: Set a token expiry date and schedule a calendar reminder to rotate it before it expires. An expired token will cause the integration to stop syncing, which will leave your dashboards with stale data.