GitLab
Overview
GitLab is a DevOps platform for source control, CI/CD, and project planning. Integrate with GitLab to automate developer workflows from Suger — browse projects and groups, read and write repository files, branches, and commits, manage issues and merge requests, and drive CI/CD pipelines, jobs, and releases.
Org-Level vs User-Level
Org-Level: Organization-wide access via a GitLab access token — a service-account personal access token (preferred) or a Group Access Token. Best for shared, company-wide automation, and supports self-managed GitLab instances.
User-Level: Personal GitLab.com access via OAuth. Use when you want to connect your own account and repositories.
Create Integration (Org-Level)
Prerequisites
- A GitLab access token with the
apiscope. Options, in order of preference:- a service account personal access token (Premium/Ultimate),
- a Group Access Token (Premium/Ultimate), or
- a personal access token (any tier, including Free).
- The token’s identity must be a member of the groups and projects you want to access.
- For self-managed GitLab, your instance host name (e.g.
gitlab.example.com).
Create a service-account access token (recommended)
A service account is a machine user that isn’t tied to a person, so the integration keeps working through staff changes. Setting one up is two steps:
- Create the service account — as a group Owner, create a service account under your top-level group (Group → Settings → Service accounts, or via the API).
- Create an access token for it — generate an access token for that service account with the
apiscope, and set an expiration date (GitLab caps this — typically 1 year).
Then add the service account as a member of the groups and projects you want Suger to access (any role — it does not need to be Owner).
Authenticate
- Navigate to Settings > Integrations
- Click Connect GitLab
- Paste your GitLab access token
- For self-managed GitLab, enter your instance host name (GitLab.com is used by default)
- Submit — the integration is verified automatically and its status updates to
verified
Create User Integration
Use user-level integration when you want to connect your personal GitLab.com account.
- Click
Connect Nowbutton in the User Integrations section - You will be redirected to GitLab to authorize
- Grant Suger access to your GitLab account
- Return to Suger — the integration is connected and verified automatically
Suger AI Tools
When GitLab is connected, the Suger AI agent can automate GitLab through Suger’s built-in tools (45 actions). Capabilities are grouped below.
Org-level and user-level: Both are supported; user-level takes precedence when both are connected.
| Capability | What the agent can do |
|---|---|
| Projects & groups | Create and manage projects and groups (e.g. create-project, list-groups) |
| Repository files | Read and write repository files (e.g. get-file, create-file, update-file) |
| Branches & commits | Manage branches and commits (e.g. create-branch, create-commit, list-commits) |
| Merge requests | Full merge-request lifecycle (e.g. create-merge-request, update-merge-request) |
| Issues | Issue CRUD (e.g. create-issue, update-issue) |
| CI/CD | Drive pipelines and jobs and publish releases (e.g. create-pipeline, retry-job, create-release) |
Edit Integration
Editing is not supported. Delete and recreate.
Delete Integration
Deleting removes the integration and revokes the stored credentials from Suger.
Spotted something wrong or out of date on this page? Tell us and we'll correct it.