GitLab
Connect gitlab.com with a read_api access token and read projects, commits, merge requests, issues, releases and pipelines.
A GitLab connection reads gitlab.com projects with an access token that has
the read_api scope only. It calls only gitlab.com. Merge requests are read
into the pull_requests table. For the tables, columns and limits that every
forge shares, see the Git overview.
Preview
Git connections are in Preview and are enabled on request: contact
support@xentropy.ai. Until GitLab is enabled for your account it is not
offered in the forge selector, and its reads fail with PROVIDER_DISABLED.
Create a read-only token
A personal access token (it starts with glpat-) reads every project your
account is a member of.
read_api scope only.To limit the connection to one group or project, create a group or project
access token instead, with the read_api scope and the Reporter role.
Token permissions
The form lists this scope with a copy button.
| Scope | Unlocks |
|---|---|
read_api | Read-only API access to projects, commits, merge requests, issues, releases, tags, branches, contributors and pipelines |
Set up the connection
Project full names are the path with namespace, such as acme/platform/api.
Connect with GitLab (sign-in with your gitlab.com account) appears only when GitLab sign-in is available for your account. Until then, connect with a token as above.
Resources
| Resource | Available | Notes |
|---|---|---|
repositories | Yes | Projects you are a member of |
commits | Yes | The default branch, or the branch you choose, in the date range, with line counts |
pull_requests | Yes | Merge requests; number is the project-level ! number |
issues | Yes | number is the project-level # number |
releases | Yes | id is the release's tag |
tags | Yes | |
branches | Yes | |
contributors | Yes | GitLab's contributor list, by name and e-mail |
pipeline_runs | Yes | Pipelines created in the date range |
Columns left empty
| Resource | Empty columns |
|---|---|
repositories | language, size_kb, pushed_at |
commits | author_login |
pull_requests | additions, deletions, changed_files |
releases | draft, prerelease |
contributors | login |
pipeline_runs | actor_login, started_at, finished_at, duration_s |
GitLab commits carry the author's name and e-mail but no login, and the
contributor list has no login either. Name and e-mail are personal data, off
by default. The pipeline list has no timings: use created_at.
Limits
gitlab.com allows 2,000 API requests per minute per user, and returns 429
with Retry-After when a limit is reached. Xentropy reads the RateLimit-*
headers and waits for the reset. See
Limits and refresh for pages, rows and
deadlines.
Errors
| Response | Code | Cause | What to do |
|---|---|---|---|
| 401 | PROVIDER_ACCESS_DENIED, stage auth | The token expired, was revoked, or was mistyped | Create a new token and choose Replace configuration |
| 403 | PROVIDER_ACCESS_DENIED, stage permissions | The token lacks the scope. details.missingScopes names it (read_api) | Create a token with read_api; scopes cannot be added to an existing token |
| 404 | NOT_FOUND | The project does not exist, or the token cannot see it. GitLab answers 404 for projects you have no access to | Check membership, or the group or project the access token belongs to |
| Redirect | NOT_FOUND | The project moved or was renamed | Select the project under its new path |
| 429 | RATE_LIMITED | The rate limit is used up | Retry after details.retryAt; scheduled refreshes wait by themselves |