> For the complete documentation index, see [llms.txt](https://docs.logilica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.logilica.com/integration/connecting-tools/gitlab.md).

# GitLab

The GitLab connector imports merge requests, commits, review activity and releases from GitLab.com and self-hosted GitLab so your delivery, review and DORA metrics reflect real repository activity.

## Authentication

Logilica connects to GitLab using a **Personal Access Token** with read access to the projects you want to import. The token needs the `read_api`, `read_user`, and `read_repository` scopes (read-only). The same connector works for both **GitLab.com** and **self-hosted GitLab** — provide your instance host when installing the connector and Logilica routes all API calls to it.

See [Connecting Tools](/integration/connecting-tools.md) for the general installation flow.

## What's Imported

For each connected project, Logilica imports:

* **Merge requests** — title, description, author, source/target branch, created/updated/closed/merged timestamps and the merger
* **Commits** on each merge request, including author, message and authored/committed times
* **Notes and discussions** — comments and diff-line discussions
* **Approvals** — who approved and how many approvals are still required
* **Releases** — name, tag, target commit, author and publish date (see [How Logilica Maps the Data](#how-logilica-maps-the-data))
* **Contributor identities** — username, name and public email for every author, reviewer and merger

{% hint style="info" %}
Optional connector settings add **GitLab Pipelines** build data and **team (group) synchronisation**. These are toggled on the connector's configuration page after installation. See [Connecting Tools](/integration/connecting-tools.md#connector-settings).
{% endhint %}

## How Logilica Maps the Data

### Merge request state

Logilica tracks each merge request through its lifecycle — open, reviewed, approved, merged or closed — combining GitLab's status with review activity.

### Review lifecycle

Logilica captures who reviewed each merge request, which files they reviewed, approvals, and review timing from GitLab's comments and approval feature.

{% hint style="info" %}
On GitLab, approval status comes from GitLab's approval feature rather than from review comments. The "changes requested" detail available on GitHub is not available for GitLab.
{% endhint %}

### Release detection

Logilica detects releases two ways, controlled by your [Release Detection](/configuration/release-detection.md) settings:

* **GitLab Releases** — when release detection is set to use repository releases, Logilica imports releases directly from GitLab, including the tag, commit and author.
* **Merge request patterns** — Logilica can also treat merge requests whose title matches your configured release pattern as releases.

Release data feeds [DORA metrics](/configuration/dora-configuration.md) and the [Build dashboard](/metrics-and-reports/build.md).

### Linking merge requests to tickets

Logilica recognises issue keys in commit messages, merge request titles and branch names to connect code changes to planning work. See [Linking Pull Requests and Tickets](/integration/linking-pull-requests-and-tickets.md) for how this works and how to format references.

## Good to Know

* **Kept in sync automatically.** After the initial import, Logilica refreshes this connection on a regular schedule — you don't need to re-trigger imports.
* **First import covers the last 6 months.** Only merge requests updated in the last 6 months are imported on the first scan. Merge requests created more than 6 months ago that are already closed or merged are skipped. Importing older history requires a configuration change by Logilica — contact support.
* **Merge requests with no commits are skipped.**
* **Close timestamps can be approximate on self-hosted GitLab.** Where GitLab does not report a close time, Logilica uses an approximate time instead.
* **Comments are counted, not stored verbatim.** Logilica records comment counts and which files were reviewed, but does not retain comment text.
