Skip to content
Marvex

Source control

GitLab Integration

Merge requests, notes, commits, diffs and pipelines, pulled from GitLab.com or a self-managed instance and normalised into the same delivery model as every other source — so a mixed estate produces one set of numbers.

Marvex connects to GitLab through its REST API to read projects, merge requests, merge request notes and commits, diffs, branches and CI/CD pipelines, producing the same DORA and cycle-time metrics it produces for GitHub.

AuthA GitLab personal access token with read_api (or api) scope. GitLab.com and self-managed instances are both supported — the connector takes a domain, defaulting to https://gitlab.com, and addresses that instance’s REST API. The token is validated on save, stored encrypted at rest, and used only within the Marvex organisation it was added to.
A developer writing code on a desktop monitor in an open-plan office

Data Marvex reads

What we pull from GitLab

  • The authenticated user, the groups they belong to, and group members — used to map GitLab identities onto Marvex users and teams
  • Projects visible to the token, at user and group level, with project metadata, project members and detected languages
  • Project contributors, for identity mapping and per-repository contribution context
  • Merge requests per project, fetched incrementally from a bookmark so each sync only reads what changed
  • Merge request notes — the discussion and system notes that carry review, approval and lifecycle events
  • Merge request commits, giving authorship and commit-level timestamps inside each MR
  • Merge request diffs, used for the additions, deletions and file counts behind merge request size
  • Project branches and project commits, including standalone commits outside a merge request
  • Individual commits and their diffs, for line-level statistics on commits that need enriching
  • CI/CD pipelines per project, and individual pipeline detail, for WORKFLOW-mode deployment detection

Once connected

What it unlocks

  • Deployment frequency from merges into a production branch, or from CI/CD pipeline completion
  • Lead time for changes across GitLab projects, decomposed into pickup, review, rework and merge
  • Merge request analytics: size from the diff, review depth from notes, rework from post-review commits
  • Team and org dashboards spanning GitLab and GitHub repositories in one view
  • Sprint reports that carry GitLab delivery activity alongside Jira or SALT issues
  • Velo answers about GitLab projects on the same footing as GitHub ones

Merge requests are not pull requests, and the connector knows it

GitLab and GitHub model the same idea with different objects, and a tool that treats them as interchangeable produces subtly wrong data on one of them. The clearest example is review. GitHub has a first-class review object with a state; GitLab expresses much of the same information as notes on the merge request, mixing human discussion with system notes that record approvals, assignments and state changes.

The GitLab connector therefore reads merge request notes and classifies them, separating the lifecycle events that belong on the delivery timeline from ordinary conversation. That is what makes review latency and review depth comparable between a GitHub pull request and a GitLab merge request rather than merely similar-looking.

Merge request size comes from the diff endpoint rather than from a summary field, so additions, deletions and files changed are counted the same way on both providers. Commits inside a merge request are read directly, which is what allows the "PR worked on" attribution — a member who authored at least one non-merge commit in the merge request — to behave identically across the estate.

  • Notes are classified into lifecycle events and discussion, not treated as one blob
  • Size comes from the diff, so it is comparable with GitHub PR size
  • MR commits are read individually, enabling non-merge-commit attribution
  • Everything normalises into one delivery model shared with GitHub

Pipelines as deployments

For GitLab projects, WORKFLOW-mode deployment detection reads CI/CD pipelines. Marvex fetches pipelines per project and can fetch an individual pipeline for detail, then treats the completion of a configured pipeline as a deployment event with its own timing and conclusion.

The alternative, PR_MERGE mode, records a deployment when a merge request is merged into a branch you have designated as production. As on GitHub, the mode is configured per project, so a monorepo that ships on a pipeline and a service that ships on merge can coexist under one organisation without either being mismeasured.

If your GitLab pipelines run multiple stages and only the last one actually deploys, configure the pipeline that represents shipping rather than the one that represents CI passing. Deployment frequency is only meaningful if the event it counts is the event your team would call a release.

Incremental sync and self-managed instances

Merge requests are fetched from a bookmark rather than re-read from the beginning of history on every cycle, so a steady-state sync reads what changed since last time. Pagination is handled inside the client, which walks GitLab’s paged responses to completion rather than silently stopping at the first page — a failure mode that produces plausible-looking but incomplete metrics.

Self-managed GitLab is a first-class case, not an afterthought. The connector takes a domain and defaults to https://gitlab.com; point it at your own instance and every call goes there instead. Authentication is unchanged, and a token that is rejected is reported as an authentication failure rather than being retried into a rate-limit error.

As with every other source, the sync writes into the platform’s own store and dashboards read from there. GitLab is queried by the background worker, not by a page load, so a slow or unavailable instance delays new data rather than breaking the dashboards that already have it.

  • Bookmark-based incremental merge request sync
  • Full pagination inside the client, not first-page-only reads
  • GitLab.com and self-managed on the same code path
  • Authentication failures reported distinctly from rate limiting

Running a mixed GitHub and GitLab estate

Plenty of organisations end up with both, usually through acquisition or through a platform team that never finished a migration. The awkward part is normally reporting: two tools, two definitions, and a quarterly roll-up assembled by hand in a spreadsheet.

Because Marvex normalises both providers into one delivery model, a team dashboard can span repositories from both, and an org roll-up counts a GitLab deployment and a GitHub deployment as the same kind of event. Provider and deployment mode are per-repository settings, so nothing forces an estate to be uniform in order to be measured.

The honest caveat is identity. A person with different usernames on GitHub and GitLab is two identities until they are mapped to one Marvex user, and per-person views will look thin until that mapping exists. Marvex reads contributors and members from both providers precisely so that this mapping can be made once and then relied on.

Frequently asked questions

What GitLab data does Marvex read?

Marvex reads the authenticated user, groups and group members, projects at user and group level with their metadata, members, languages and contributors, merge requests, merge request notes, merge request commits and merge request diffs, project branches and project commits, individual commits with their diffs, and CI/CD pipelines. Merge requests are fetched incrementally from a bookmark, so a routine sync reads only what has changed since the previous run.

What token does the GitLab integration need?

A GitLab personal access token with read_api scope is sufficient for analytics; api scope also works if your organisation issues tokens that way. The token is validated when you save the integration, stored encrypted at rest, and scoped to the single Marvex organisation it was added to. Because the connector inherits the token holder’s project visibility, a token issued to a service account with access to every relevant group produces more complete data than one issued to an individual.

Does Marvex support self-managed GitLab?

Yes. The GitLab connector takes an instance domain and defaults to https://gitlab.com; set it to your own host and every API call is addressed there instead. Self-managed and GitLab.com run on the same code path, so the data pulled, the sync behaviour and the resulting metrics are identical. Nothing about a self-managed instance requires a different configuration beyond the domain and a token valid on it.

How does Marvex measure review time on a GitLab merge request?

GitLab records much of a merge request’s review activity as notes, mixing human discussion with system notes for approvals, assignments and state changes. Marvex reads those notes and classifies them, separating lifecycle events from ordinary conversation, then uses the lifecycle events to build the same cycle-time stages it builds on GitHub: first response, review, rework and merge. That classification is what makes review latency comparable between the two providers rather than merely similar-looking.

How are deployments detected in GitLab projects?

Either from a merge into a branch you have designated as production (PR_MERGE mode), or from the completion of a configured CI/CD pipeline (WORKFLOW mode). The mode is set per project. If your pipelines run several stages and only the last one ships, configure the pipeline that represents shipping rather than the one that represents CI passing — deployment frequency is only meaningful when it counts the event your team would call a release.

Can one Marvex organisation use GitHub and GitLab at the same time?

Yes. Provider and deployment mode are per-repository settings, so an estate can mix GitHub and GitLab freely, and both normalise into the same delivery model. A team dashboard can span repositories from both providers and an org roll-up treats a GitLab deployment and a GitHub deployment as the same kind of event. The one thing worth doing early is mapping people who have different usernames on each provider to a single Marvex user, otherwise per-person views split across two identities.

Marvex

Connect GitLab to Marvex

Authorise the GitLab integration and Marvex builds your delivery views from the history already in it. Integration tokens are encrypted at rest and scoped to your organisation.