Docs

Integrations

GitLab

Attach gitlab.com projects to a stack, open merge requests from agent work, and run automations from merge request, pipeline, and push activity.

What GitLab support covers

  • Projects: attach gitlab.com projects to a stack beside GitHub and Bitbucket repositories. Agents clone them, push branches, and open merge requests.
  • Merge requests: an agent links each merge request it opens to its task, and merge request activity keeps the task status current, the same way GitHub pull requests do.
  • Review Hub: review and merge a GitLab merge request from Gleamrun. See Review Hub.
  • Automations: start agent work from merge request, comment, approval, job, pipeline, and push events. See Automation triggers.

Connect as a bot user

The connected GitLab account registers webhooks, opens merge requests, and posts comments. Use a dedicated bot user so the connection does not depend on a teammate's account or access.

  1. Create a regular GitLab user for Gleamrun, for example Gleamrun-bot.
  2. Invite it as Maintainer on each project or group Gleamrun should work in, and nowhere else.
  3. Sign in to GitLab as the bot user in your browser.
  4. In Gleamrun, open Workspace Settings → Integrations → GitLab and choose Connect GitLab. Approve the request on GitLab.
  5. Open the stack that should use the code and choose Repositories → Add Repository, then pick the project on the GitLab tab.

Only workspace owners and admins can connect, reconnect, or disconnect GitLab.

Why not a GitLab service account?
GitLab service accounts cannot sign in, so they cannot complete the connect step. Use a regular user. On a paid GitLab plan, the bot user takes up a seat.

To move an existing connection to a bot user, sign in to GitLab as the bot user and choose Reconnect on the GitLab card.

The Maintainer requirement

The connected account needs at least Maintainer access to each project so Gleamrun can register its webhook. The picker lists projects where the account is Maintainer or Owner, either directly or through a group. Projects in the bot user's personal namespace are excluded.

If a project is missing from the picker, ask a project or group Owner to raise the bot user to Maintainer, then select Refresh on the GitLab tab.

Webhooks

Gleamrun registers its own webhooks; you do not create them in GitLab. Each webhook subscribes to merge request, comment, pipeline, job, and push events and signs every delivery with a key that only Gleamrun holds.

  • Project webhooks: by default, each attached project gets one project webhook. This works on every GitLab tier. When a project is removed from every stack, its project webhook is removed too.
  • Group webhook: requires GitLab Premium or Ultimate and a bot user with the Owner role on a top-level group. One webhook covers every project in that group and its subgroups, including projects attached later. Gleamrun removes the project webhooks it replaces to prevent duplicate events. GitLab Free and connections without the Owner role keep using project webhooks.

Repair and rotate

Both actions are on the GitLab card in Workspace Settings → Integrations.

  • Repair webhooks: use this when the card shows Webhooks unverified, when events stop arriving, or after someone edits or deletes a webhook in GitLab. Gleamrun recreates missing webhooks, restores event subscriptions, and sends the signing key again. It also enables webhooks that GitLab disabled after repeated failed deliveries.
  • Rotate signing key: use it if the signing key may have leaked. Gleamrun updates the key on GitLab first, then keeps accepting the old key for a short grace period so deliveries already in flight still verify.

If a repair reports a failure, check that the bot user is still a Maintainer of that project. Disconnect removes every webhook the connection registered.

Automation triggers

Choose GitLab as the trigger source on an automation, then pick a project attached to the stack, or watch every GitLab project in the stack. See Automations for how triggers, conditions, and runs work.

  • Merge request opened: a merge request is opened or reopened, including as a draft.
  • Merge request marked ready: a draft merge request is marked ready.
  • Merge request has new commits: new commits are pushed to the source branch. A title or description edit does not fire it.
  • Merge request merged or closed: add the condition Is merged equals true to run on merges only.
  • Merge request hit merge conflicts: GitLab sends no event for this, so Gleamrun reads the merge status on each merge request and pipeline delivery, when the Review Hub opens, and on a periodic check. It fires when a merge request enters conflict.
  • A review is submitted: someone approves, removes an approval, or a reviewer marks their review done or requests changes. Use the Review verdict field to tell them apart.
  • A comment is created: any new merge request comment. Use A thread comment is created for comments in the merge request's overview thread, or A diff comment is created for comments on a line of the diff.
  • A job completes: one CI job finishes. It fires once per job and does not carry the merge request URL.
  • A pipeline completes: a whole pipeline finishes. Use it for "CI finished on this merge request".
  • A branch is pushed: commits are pushed to any branch in scope.
Large pushes do not fire push triggers
GitLab sends no push webhook for a single push that changes more than three branches or tags at once. Such a push never fires A branch is pushed. Push branches one at a time when an automation depends on them.

Review Hub

Open a linked GitLab merge request in the Review Hub to see pipeline and job results, approvals, and comments received through its webhook. Opening the hub also refreshes its conflict state. GitLab does not send an event when a branch starts conflicting with its target.

The Review Hub uses the project's merge method from GitLab. You can choose whether to squash each merge. If GitLab refuses a merge, Gleamrun shows the reason, such as conflicts, draft status, missing approval, or a required pipeline. See Review & Merge.

Current limitations

  • gitlab.com only: self-managed GitLab and GitLab Dedicated instances are not supported.
  • No GitLab Issues: issue events and comments on issues, commits, and snippets do not reach automations. Only merge requests, pipelines, jobs, and pushes do.
  • No setup secret scan: during stack setup, Gleamrun checks GitHub setup pull requests for values you supplied, such as API keys, before linking them. GitLab setup merge requests are linked without this check, so review them before merging.

Respond to merge request comments

Use the Gleamrun GitLab MR Bot automation template for @Gleamrun comments. It continues the merge request's existing branch and replies on the merge request. See Automations.