Use GitLab for branches, merge requests and auto-merge
- graal Agentic Platform
- Version 0.30 (actuelle)
- Open source · Apache 2.0
- Source : graalsystems/tranibor@v0.30.1
For a project owner. Procedure connector.scm.gitlab, version 1, reviewed 2026-11-04 against the vendor’s own pages. It applies to the connector type scm/gitlab.
It ships with the platform. In the console it opens with How to set this up, beside the form that adds the connector and on the connector’s settings.
Addresses are written <api_url>, <public_url> and <org> here: the console shows the same text with your deployment’s own.
Before you start
Section intitulée « Before you start »- A GitLab project the agents change. They work on a branch and open a merge request; nothing is pushed to the default branch.
- You are a Maintainer of that project: the connector creates a short-lived token for each run, and only a Maintainer can create project access tokens.
- GitLab.com needs the Premium or Ultimate tier for project access tokens. On the Free tier the connector cannot give a run its token. A self-managed GitLab has no such tier limit.
- The platform’s shared webhook secret (
TRANIBOR_GENERIC_WEBHOOK_SECRET), held by whoever operates Tranibor, if you want merge request events.
At GitLab
Section intitulée « At GitLab »- Project, Settings, Access tokens, Add new token: role Maintainer, scope api, and an expiry. Copy the token when it is shown. This is the connector’s own token: it stays on the platform.
- Optional, for merge request events: Project, Settings, Webhooks, Add new webhook: URL
<api_url>/api/v1/webhooks/gitlab, Secret token the platform’s shared webhook secret, and the trigger Merge request events. If the project already has this webhook for its tracker, tick Merge request events on it instead of adding a second one.
Permissions
Section intitulée « Permissions »- The connector’s token needs the Maintainer role and the
apiscope: it creates branches, commits, merge requests and notes, sets reviewers, turns on auto-merge, and creates the per-run tokens. - A run never receives that token. Each run gets its own project access token, created when the run
starts: scope
write_repositoryonly, role Developer, namedchoregos-run-<id>, expiring the next day (UTC). GitLab counts token lifetimes in days, so a day is the shortest there is. - GitLab has no revoke at run end in this connector: a run token stays valid until its expiry date. The
next time a run starts, the connector deletes the project’s expired
choregos-run-tokens (at most 20 per run, and a failure there never stops the run). Tokens with other names are never touched. Each token is backed by a bot user in the project: this cleanup is what keeps them from piling up.
In Tranibor
Section intitulée « In Tranibor »- Project settings, Connectors, SCM, type GitLab.
base_url:https://gitlab.com(the default) or your self-managed address.project: the project’s path (for examplegroup/app) or numeric id.default_branch: the branch merge requests target.token: the Maintainer access token, in the password field (sealed, shown once).
Press Test: the connector reads the project and answers ok. Then start a run: a choregos-run- token
appears in the project’s access tokens, expiring tomorrow, and a merge request opens. Auto-merge turns on
“merge when the pipeline succeeds”; the project needs a pipeline for that to mean anything.
When it fails
Section intitulée « When it fails »401from GitLab: the connector’s token is wrong, expired or revoked.403when a run starts: the token is not a Maintainer’s, lacks theapiscope, or the GitLab.com tier has no project access tokens (Premium or Ultimate).404on the project: the token belongs to another project, or the path is wrong.- Merge refused after auto-merge: the project’s merge rules (approvals, a required pipeline) are not met yet; GitLab merges when they are.
- A self-managed GitLab with a private certificate authority: the API must trust it.
| Field | What to put in it |
|---|---|
base_url |
https://gitlab.com, or your self-managed GitLab |
default_branch |
the branch merge requests target, main by default |
project |
the project’s path with namespace, or its numeric id |
token |
a project access token with the Maintainer role and the api scope, typed once |
Network egress
Section intitulée « Network egress »Hosts the platform must be allowed to reach:
gitlab.com