# GitLab

Репозитории, проекты, issues, merge requests, пайплайны и CI/CD

## Scenarios

### MRs waiting on review
The agent collects open merge requests across your projects and shows which ones have sat without review the longest and whose turn it is.

### Failed pipelines
The agent digs into failed pipelines: which job broke, whose commit triggered it and whether it has happened before.

### Morning project digest
The agent sends a scheduled digest: new issues, merged merge requests and the status of overnight CI/CD pipelines.

### Events in the team chat
The agent catches a push, a new merge request or a failed pipeline via webhook and posts about it in your work chat.

## How to connect

### Sign in with an account that has project access
A token inherits its owner's permissions: in a private project the Guest role is limited, reading code and pipelines needs at least Reporter, and creating merge requests needs Developer.

### Determine your GitLab address
GitLab SaaS lives at https://gitlab.com. For a self-managed instance take its root address with the scheme, e.g. https://git.company.ru, and leave off /api/v4 — the API path is appended automatically.

### Open «Personal access tokens» in your profile
Click your avatar in the upper-right corner → «Edit profile» → in the left sidebar «Access» → «Personal access tokens». From the «Generate token» dropdown list pick «Legacy token».

### Grant the «api» scope and copy the token at once
Tick the «api» scope — it grants read and write access to projects, issues, merge requests and pipelines; «read_api» leaves read-only. An expiry date is mandatory, 365 days by default. The glpat-… token is shown only once.

## FAQ

### How do I connect GitLab?
With a personal token: avatar → Edit profile → Access → Personal access tokens, then Generate token in the list, pick Legacy token and tick the api scope — read_api leaves you with view access only. The address is a separate field and defaults to https://gitlab.com.

### What does the agent see in GitLab?
Projects, issues, merge requests, comments, commits and CI/CD pipelines — exactly within your account permissions, the token grants nothing more.

### Does it work with a self-hosted instance?
Yes: enter the root URL of your own instance instead of https://gitlab.com when connecting, without /api/v4 at the end. The token has to be issued in the same instance the agent talks to.

### Does the agent write to GitLab?
By default the agent reads projects and reports back in chat. With the api scope writing is technically possible, but the agent confirms such actions with you before performing them.

[Open GitLab](https://gitlab.com)
