Dataset
GitLab merge request and pipeline datasets for AI training
A GitLab dataset is a collection of the records a GitLab group or instance holds in its projects: repositories, issues and epics, merge requests with their diff versions and discussion notes, and the CI/CD pipelines, jobs and job logs run against each commit. SourceX sources it to a buyer's spec from established businesses that run GitLab, on GitLab.com or a self-managed server. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- Projects with repositories, issues, merge requests with diff versions and notes, and CI/CD pipelines with job logs
- Typical systems
- GitLab.com or GitLab Self-Managed on Free, Premium or Ultimate: repositories, issues, epics, merge requests, GitLab CI/CD
- Typical history
- Varies by instance; merge request records often span years, job logs and artifacts as far as the instance kept them
- Modality
- Source code and diffs, Markdown note text, plain text job logs and structured pipeline records
- Delivery formats
- Agreed per order; git bundles, NDJSON or JSONL records keyed by project, iid and commit SHA, job logs as text
- Preparation
- Secrets purged from history, notes and job logs; usernames, commit emails, project paths and internal hosts pseudonymized
- Licensing
- Scoped per project after ownership review; depends on the owner's rights in the code and on GitLab's terms
- Availability
- Sourced to your spec from businesses that run GitLab; supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| project_ref | object | The Project: pseudonymous path, default branch, visibility and the instance's tier and hosting type. |
| merge_request_iid | integer | The Merge request's iid, unique within its Project; an Issue with the same iid is a different record. |
| source_and_target | object | The Merge request's source_branch, target_branch, head sha and diff_refs (base, start and head SHAs). |
| diff_versions | array | Each Merge request diff version, one per push: head_commit_sha, base_commit_sha, start_commit_sha, state and its commits and diffs. |
| discussions | array | Each Discussion on the Merge request or Issue: id, the individual_note flag and its ordered Notes. |
| diff_note_position | object | The position of a Note of type DiffNote: base_sha, start_sha, head_sha, old_path, new_path, old_line and new_line. |
| note_resolution | object | The resolvable, resolved, resolved_by and resolved_at values on Merge request Notes. |
| system_notes | array | Notes with system set to true, which GitLab writes for pushes, title changes, assignments and mentions. |
| approvals | object | Who approved the Merge request, and the approval rules in force where the tier records them. |
| merge_outcome | object | The Merge request's state, merge_user, merged_at, merge_commit_sha, squash_commit_sha and closed_by. |
| pipelines | array | Each Pipeline for the Merge request: sha, ref, source, status, duration and yaml_errors. |
| pipeline_jobs | array | Each Job in a Pipeline: name, stage, status, failure_reason, allow_failure, runner and timings, retried jobs included. |
| job_trace | string | The Job trace, the plain text log returned by the jobs API, with its section markers. |
| issue_context | object | The linked Issue's iid, labels, Milestone and Epic, with label and state events. |
Field names from the table above; values are masked placeholders.
Example record
{
"project_ref": {
"path": "group_41/proj_billing_api",
"default_branch": "main",
"hosting": "self-managed",
"tier": "premium"
},
"merge_request_iid": 612,
"source_and_target": {
"source_branch": "fix/proration-rounding",
"target_branch": "main",
"sha": "7d03be1"
},
"diff_versions": [
{
"version": 1,
"head_commit_sha": "a92c4f0",
"base_commit_sha": "3e61d7a",
"start_commit_sha": "3e61d7a"
},
{
"version": 2,
"head_commit_sha": "7d03be1",
"base_commit_sha": "3e61d7a",
"start_commit_sha": "b18f2c9"
}
],
"discussions": [
{
"id": "disc_5c1e",
"individual_note": false,
"notes": [
{
"type": "DiffNote",
"author": "user_033",
"body": "Rounding per line item drifts from the invoice total. Round once on the sum."
},
{
"type": "DiffNote",
"author": "user_058",
"body": "Done in the second push, with a test for the three-item case."
}
]
}
],
"diff_note_position": {
"disc_5c1e": {
"base_sha": "3e61d7a",
"start_sha": "3e61d7a",
"head_sha": "a92c4f0",
"new_path": "app/services/proration.rb",
"new_line": 58
}
},
"note_resolution": {"disc_5c1e": {"resolved": true, "resolved_by": "user_033"}},
"system_notes": [{"body": "added 1 commit"}],
"approvals": {"approved_by": ["user_033"]},
"merge_outcome": {
"state": "merged",
"merge_user": "user_058",
"squash_commit_sha": "e5a7709",
"merge_commit_sha": null
},
"pipelines": [
{"id": "pl_88140", "sha": "a92c4f0", "source": "merge_request_event", "status": "failed"},
{"id": "pl_88203", "sha": "7d03be1", "source": "merge_request_event", "status": "success"}
],
"pipeline_jobs": [
{
"name": "rspec 2/4",
"stage": "test",
"status": "failed",
"failure_reason": "script_failure",
"allow_failure": false
}
],
"job_trace": "section_start:1738577820:step_script\r$ bundle exec rspec\nFailure: Proration rounds once on the invoice total\n expected 104.17, got 104.18\nsection_end:1738577911:step_script\r\nERROR: Job failed: exit code 1",
"issue_context": {"iid": 377, "labels": ["billing", "bug"]}
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Train review models on versioned diffs
A diff note, the diff version it was written on and the version that answered it form one review round.
Pair failed pipelines with their fixes
A failed pipeline on one diff version and a passing one on the next give a failure, its log and the change that cleared it.
Build issue-to-merge-request tasks
An issue's description, the merge request that closed it and the pipeline result make a task with a recorded outcome.
Evaluate agents on review and CI together
Private projects hold the reviewer's objection and the pipeline's verdict on the same version.
Learn CI configuration repair
Changes to .gitlab-ci.yml sit in the same history as the pipelines and yaml_errors they produced.
Use-case guides: Coding agents, Private evaluation sets, Enterprise and computer-use agents
What makes this data valuable
Every diff version delivered
Each push to a merge request arrives as its own version with its three SHAs.
Note positions kept
Diff notes carry base, start and head SHAs, paths and lines, with resolution state.
Job traces present
Failed jobs come with log text pulled from the jobs API, with a stated date range.
Retried jobs included
Retried jobs and child pipelines were requested explicitly and are marked.
System notes separated
Notes GitLab wrote are flagged apart from notes people wrote.
Tier and version stated
The manifest says which tier and hosting type the instance ran over the period.
System export
GitLab dataset
One project holds the diff version, the note and the pipeline
GitLab keeps source, review and CI in one project, so the join keys are native. Each push to a merge request's source branch creates a new diff version, one per push however many commits it carried. A version records three SHAs: head_commit_sha, the head of the source branch, base_commit_sha, the merge base, and start_commit_sha, the head of the target branch when the version was made. A note left on the diff stores a position with the same three SHAs plus file path and line. A pipeline stores the sha it ran on. Match the note's head_sha to a version and the version's head to a pipeline, and each review round reads as a unit: the code as pushed, what the reviewer said, what CI said, and the next version that answered both.
What GitLab keeps is the record of the merge request more than the git objects behind it. The versions API returns each version's commits and diffs, and earlier versions stay available for comparison after later pushes. The merge request's head ref in the repository is another matter. GitLab's documentation says it is deleted 14 days after the merge request is merged or closed, and a squash replaces the reviewed commits with one commit, recorded as squash_commit_sha. A clone taken today can therefore lack the commits a reviewer commented on, while the diff versions still hold them.
Two details need care. System notes, which GitLab writes for each push and for changes of title or assignee, sit in the same list as human notes and are told apart by a system flag, and label changes live in separate resource event records. A merge request pipeline tests the source branch alone. A merged results pipeline, a Premium and Ultimate feature, tests a temporary commit that merges source and target and exists on neither branch, so its sha may not be a version's head. Ask how those pipelines were tied to a version, and read two passing pipelines as two different claims.
The export file stops at the job log
GitLab's project export produces an archive with the repository beside NDJSON files for the project's records. GitLab's documentation lists what goes in: the repositories, issues with comments and state events, merge requests with diffs, comments, reviewers and approvers, releases and CI/CD pipelines. It also lists what does not: CI/CD job logs and artifacts, child pipeline history, CI/CD variables, links between issues and links to related merge requests. So a pipeline arrives as a row with a status and none of the text its jobs printed. Epics belong to the group, so they come from a group export, which leaves projects out.
Job traces therefore need a second pull through the jobs API, and two defaults thin the result: retried jobs are left out of a pipeline's job list unless asked for, and child pipelines are left out of pipeline lists. How far back traces go is decided by the instance. Artifacts expire on the job's expire_in value or the instance default. GitLab's administration documentation says job logs have no automatic expiry of their own, but they go when a job is erased, when an administrator removes old logs from storage, or when a project's automatic pipeline cleanup deletes old pipelines with their jobs, logs and artifacts. A raw trace also carries section_start and section_end markers and terminal escape codes that a parser has to strip.
To test a sample, pick a merge request with several pushes and count its diff versions against its push system notes. Match a diff note's head_sha to a version and that version to a pipeline, then open the failed job's trace. Check that note authors vary, because some imports reassign every contribution to the importing user. Search traces for the [MASKED] placeholder GitLab prints in place of a masked variable, and for tokens that were never masked.
What to check before licensing
- Confirm the business owns the code in every project in scope. Contractor work, client deliverables and vendored open-source code are common exceptions.
- Ask how secrets committed in history were found and removed, and whether job traces, notes and .gitlab-ci.yml files were scanned as well.
- Read GitLab's terms on API use and exported data for the supplier's subscription. Buyer and data owner both check.
- For a self-managed instance, ask which tier and version it ran over the period. Epics and required approvals are recorded only on paid tiers.
- Ask how the data left GitLab: project export, API pull or database backup, and for which dates job traces and artifacts were pulled.
- Ask for the instance's artifact expiry and pipeline cleanup settings and when they changed, since they set how deep the job logs go.
- Confirm usernames are pseudonymized the same way in notes, commit metadata and system note text, and ask whether any project was imported from another instance.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
What does a GitLab project export contain?
It contains the repository and the project's records as NDJSON files: issues, merge requests with diffs and comments, labels, milestones, releases and pipelines, by GitLab's own list. The same list leaves out CI/CD job logs, artifacts and variables. Treat an export as the review and planning record, and ask for job logs separately.
Are CI job logs included in GitLab data?
Only if they were pulled separately and still existed. Job logs, which GitLab calls traces, are not in the project export. They come from the jobs API one job at a time, and erased jobs, storage cleanups and automatic pipeline cleanup all remove them. State the date range you need, and check the sample's oldest trace.
Can a review note be matched to the exact code it was written on?
Yes, where diff versions and note positions are delivered. GitLab stores a new diff version on every push to a merge request, and a diff note records the base, start and head SHAs it was written against. Matching the note's head SHA to a version gives the diff the reviewer saw, and the following version shows the response.
Does it matter whether the data comes from GitLab.com or a self-managed instance?
Yes. On a self-managed instance the business sets artifact expiry, pipeline cleanup limits and storage, runs its own version, and may sit on any tier, so two instances of similar age can hold very different depth. On GitLab.com the instance-level limits are set by GitLab. Ask for hosting type, tier and version history in the manifest.
Are epics and approval rules part of every GitLab dataset?
No. Epics, and required approvals with approval rules, are Premium and Ultimate features, so an instance on the Free tier never recorded them. Free projects still record optional approvals. Epics also belong to the group, not the project, so they are missing from a project-level export. If planning hierarchy or approval policy matters, name the tier in your spec.
Is SourceX affiliated with GitLab Inc.?
GitLab is named to identify the system the records come from. That does not imply a partnership with or endorsement by GitLab Inc. The records belong to the business that runs GitLab, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.
Related datasets
- Software engineering histories (issues, PRs, reviews)
Issues linked to commits, pull requests, code review, CI runs, deploys and incidents
- Code reviews and pull request histories
Private pull requests with per-revision diffs, review comments, verdicts and merge or close outcome
- CI/CD pipeline logs and build failures
Pipeline runs with step logs and exit codes, joined to triggering and fixing commits
- GitHub repositories and pull request histories
Private repositories with commit history, issues, pull requests, reviews, review comments, timeline events and discussions
- Bitbucket repositories and pull requests
Git repositories with their pull requests, pull request activity, inline comments, tasks, approvals and build results
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026. Own data like this? See how companies license it to AI developers.