GitLab Integration
Overview
Connect GitLab to enable the Git AI Agent, which correlates code changes with infrastructure incidents during investigations and chat sessions.
What It Enables
- View recent commits and merge requests
- Correlate deployments with incident timelines
- Identify code or configuration changes that caused issues
- Browse file contents and blame information
Setup
GitLab connects through OAuth. There is no personal access token to create and no token or GitLab URL field to fill in.
1. Connect
- In the OpsWorker portal, go to Integrations
- Find GitLab and click Connect
2. Authorize via OAuth
- You'll be redirected to GitLab to authorize OpsWorker (OAuth with dynamic client registration and PKCE)
- Sign in to GitLab if prompted and click Authorize
- You're redirected back to the OpsWorker portal once authorization completes
3. Configure for Cluster
Associate the GitLab integration with your cluster(s). The integration is stored per cluster and connects through the GitLab MCP endpoint (https://gitlab.com/api/v4/mcp).
Permissions
OpsWorker uses the access granted during OAuth authorization to read repositories, merge requests, and commits, and to open fix merge requests for human review. The source code agent can create branches and open merge requests, but a human always reviews and merges them.
Self-Hosted GitLab
The current OAuth flow targets gitlab.com only (the MCP endpoint is fixed to https://gitlab.com/api/v4/mcp), so self-hosted GitLab instances are not supported through self-service today. If you need self-hosted GitLab, contact the OpsWorker team.
Next Steps
- Git AI Agent: full agent capabilities
- PR Creation: code-level fix suggestions