GitLab Integration
Last updated: June 24, 2026
Aisle connects to GitLab — SaaS, self-managed, or Dedicated — using a Personal Access Token with the api scope. This article covers setup, recommended scopes, and how to tighten access for production.
Prerequisites
A GitLab user with at least Maintainer access on the projects you want Aisle to analyze. (Owner is required to manage webhooks on group-level projects.)
That user can be a real person or — recommended for production — a dedicated service account / bot user.
Admin access in Aisle to add the VCS connection.
Generate the access token
In GitLab:
Click your avatar → Preferences → Access Tokens (or User Settings → Access Tokens on older versions).
Click Add new token.
Name it
aisle-feor similar.Set an expiry — Aisle works fine with short-lived tokens as long as you rotate them; many teams use 90 days.
Select scope:
api(required).Generate and copy the token. You won't be able to see it again.
The api scope is broad. If your organization requires least privilege, GitLab Premium and above offer fine-grained personal access tokens that let you pin scopes per project; Aisle works with those as long as the token can read repository, branches, merge requests, and webhooks, and can write merge requests, MR comments, and pipeline statuses.
Connect in Aisle
In Aisle, go to Integrations → VCS Connections and click GitLab.
Fill in:
Integration Name — how this connection appears in the UI (e.g.
gitlab-prod).GitLab Server URL —
https://gitlab.comfor SaaS, or the URL of your self-managed instance.Access Token — paste the token from the previous step.
Save. The connection shows as Active once GitLab accepts the credentials.
What Aisle does with GitLab
Reads repository contents, branches, merge requests, and pipeline statuses.
Subscribes to push, merge-request, and pipeline events via project webhooks (registered automatically per imported project).
Writes merge requests, MR comments, and pipeline statuses when generating fixes.
Aisle never pushes directly to protected branches. Fixes are proposed as merge requests against feature branches.
After connecting
Import projects from Repositories → Import Repositories.
Enable the Aisle Analyzer on each project.
For CI integration in GitLab pipelines, see [GitLab CI].
Rotating the token
In GitLab, generate a new token with the same scope.
In Aisle, open the connection → Edit → paste the new token → save.
In GitLab, revoke the old token.
Plan rotation ahead of expiry — Aisle will surface Expired token the moment the credential dies, but webhooks queued during the gap may need to be redelivered manually.
Troubleshooting
Symptom | What to check |
|---|---|
Invalid token | Confirm the token scope includes |
Imported projects don't surface MRs in the Issues Board | Check the project's Settings → Webhooks in GitLab — Aisle's webhook should be active and delivering 2xx responses. |
Some projects in a group don't appear in the import list | Confirm the user behind the token has Maintainer access at the group level for those projects (group inheritance matters). |
Fix MRs fail to open | Confirm the token can |