GitLab: a merge request waits for a pipeline that never comes
When Pipelines must succeed is on in a project, GitLab refuses to merge a merge request until its latest pipeline has succeeded, and a merge request with no pipeline at all counts as not succeeded. The page then says A CI/CD pipeline must run and be successful before merge, or shows a spinner next to Checking pipeline status (GitLab docs: debugging CI/CD pipelines and auto-merge, checked November 19, 2026).
What each message means
A CI/CD pipeline must run and be successful before merge: the Pipelines must succeed merge check is on and no pipeline has run successfully yet. It also shows when the pipeline has not been created yet, or when you wait for an external CI service.Checking pipeline statuswith a spinning icon: the merge request has no pipeline for its latest commit yet. GitLab may not have finished creating it; an external CI service may not have answered; the project may not use pipelines; the configuration may have kept every job off the source branch; the latest pipeline may have been deleted (a known issue); or the source branch may be on a private fork. With Pipelines must succeed on, the spinner can spin forever (issue 334281).Checking ability to merge automatically: GitLab is still working out whether the merge request can merge. If it does not go away after a few minutes, see the last list below.
To see that the pipeline is what blocks a merge request, and which pipeline it is: Merge Request (MR) Review Inbox for GitLab, a plugin for JetBrains IDEs, lists the merge checks from detailed_merge_status with the blocking ones first.
How the API says it
The check lives in app/services/merge_requests/mergeability/check_ci_status_service.rb; its failure text is "The pipeline must succeed." It runs only when the project requires a successful pipeline, or when the merge request is set to merge automatically with a strategy that waits for the checks. The merge request's detailed_merge_status is then:
ci_must_pass: there is no head pipeline, or it did not succeed.ci_still_running: the head pipeline is still being created or is running.- A skipped pipeline passes only when Skipped pipelines are considered successful is also on (Settings > Merge requests > Merge checks, Maintainer or Owner).
curl -H "PRIVATE-TOKEN: your-token" "https://gitlab.com/api/v4/projects/group%2Fproject/merge_requests/42"
Which pipeline counts
- When several pipeline types exist for one merge request, merge request pipelines take precedence over the others. An older successful merge request pipeline lets the merge through despite a newer failed branch pipeline, and a failed merge request pipeline blocks it whatever the branch pipeline says.
- A
rulessetup that starts both a branch pipeline and a merge request pipeline on every push makes duplicates; GitLab's advice is to let only one type run for each merge request. - A pipeline imported with the project keeps the status it had at the source, so it can satisfy the check without having run on the new server. Run a new pipeline on imported merge requests before merging them.
What to do
- No pipeline is created for merge requests: change
rulesorworkflow:rulesso a pipeline runs for every merge request. This is GitLab's example that runs a branch pipeline until a merge request opens, then a merge request pipeline:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
- The project does not use pipelines: a Maintainer or Owner turns Pipelines must succeed off, in Settings > Merge requests > Merge checks.
- External CI: wait until the service reports. The setting works with pipelines from external CI integrations too.
- Stuck on "Checking ability to merge automatically": refresh the page; close and reopen the merge request; rebase it with the
/rebasequick action; or, once you have confirmed it is ready, merge it with/merge.
For the merge API's own answers to a merge that GitLab refuses, see why GitLab refused the merge.
GitLab merge requests in IntelliJ IDEA
Merge Request (MR) Review Inbox for GitLab, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, shows a merge request's merge checks before you merge: approvals, requested changes, unresolved threads, the pipeline, conflicts, and GitLab's other reasons from detailed_merge_status, with the ones that block the merge first, and the head pipeline with a link. The pipeline check is listed with the others, and the head pipeline has a link. Reading is free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.
More: GitLab merge refused (405, 409, 422) · GitLab auto-merge refused (405) or canceled · GitLab rebase refused or failed (403, 409) · GitLab status checks must pass (status_checks_must_pass)