Reviewmerge-requests
GET/repositories/{repo_id}/merge-requests/{mr_id}/pipelines
List a merge request's pipelines at its head
get_mr_pipelines
merge_request:read
A token needs themerge_request:readscope: View merge requestsGranted bymcp_agent,mcp_agent_write,read_api,read_repository,write_api,write_repository.Every operation this scope unlocks
Every pipeline that applies to the merge request's current head and where it stands — each one
with the run that decides it, or the reason it could not start — and whether, together, they
let the merge request merge. A pipeline applies when one of its triggers matched the merge
request, or when a run of it tested the head commit. Answered whether or not the repository
requires the pipelines to pass; required says whether it does.
Parameters
Path
- repo_idRepositoryId (string · uuid)Repository ID
- mr_idMergeRequestId (integer · int64)Merge request ID
Responses
200The merge request's pipelines at its headapplication/json
- allow_without_pipelinebooleanWhether a merge request no pipeline applies to may merge (
allow_merge_without_pipeline). - evaluatedbooleanWhether the platform has decided which pipelines apply to this head. Until it has, the state is
pendingwhatever has already run. - passesbooleanWhether the pipelines let the merge request merge. Always
truewhen they are not required. pipelinesarray of MrPipelineEntryEvery pipeline that applies to the head.
- The MrPipelineEntry schema
- pipeline_idPipelineId (string · uuid)The pipeline.
- pipeline_namestringThe pipeline's name.
- stalebooleanThe target branch has moved since the run was tested against it, so its result no longer describes what will land. Never blocks a merge on its own.
- stateMrPipelineStatependingrunningfailedpassedemptyWhere this pipeline stands at the head.
- buildMrBuildTargetmerge_resultsourceor nulloptionalWhich commit a merge-request run built: the merge result, or the source branch's tip.
- commit_shastring or nulloptionalThe commit the run built — the merge result or the source tip, per
build— which is the commitapprove_pipeline_runnames. Absent when no run has started. - evaluated_target_shastring or nulloptionalThe target branch's tip the run was tested against, for a merge-request run.
- kindTriggerKindpushmerge_requesttagschedulemanualor nulloptionalWhat started the run:
merge_requestfor a run started for this merge request,pushormanualfor a run of the head commit on its own. - pipeline_run_idPipelineRunId (string · uuid) or nulloptionalThe run that decides it: the pipeline's latest run that tested the head, preferring one started for this merge request. Absent when none has started.
- refusalTriggerOutcomematchedno_trigger_matchnot_registered_at_refdraftauthority_deniedauthority_unresolvableauthority_revokedquota_exhaustedloop_guardsupersededprovider_validation_failedconnection_resolution_faileddefinition_invalidalready_triggeredmerge_conflictor nulloptionalWhy the pipeline did not start, when it applied and could not — a quota, a definition that does not resolve, a merge conflict. Absent when it started or has yet to.
- statusPipelineStatusrunningsucceededsucceeded_with_warningsfailedtimed_outcancelledor nulloptionalThat run's status.
- trustTriggerTrusttrusteduntrustedor nulloptionalWhether the run's code was trusted with the repository's connections and secrets. An
untrustedrun's result was reached without them, and a person approvingcommit_shastarts a trusted run that replaces it here. Absent when no run has started.
- requiredbooleanWhether the repository requires the pipelines to pass before a merge (
require_pipeline_success). - source_shastringThe source-branch commit the pipelines were judged at — the merge request's head.
- stateMrPipelineStatependingrunningfailedpassedemptyWhere the pipelines stand overall.
- target_shastringThe target branch's tip now, which a run's
evaluated_target_shais compared with. - refusalTriggerOutcomematchedno_trigger_matchnot_registered_at_refdraftauthority_deniedauthority_unresolvableauthority_revokedquota_exhaustedloop_guardsupersededprovider_validation_failedconnection_resolution_faileddefinition_invalidalready_triggeredmerge_conflictor nulloptionalSet when deciding which pipelines apply was itself refused — the change that should have started them named nobody the platform could act as. Running the pipelines again decides it.
200 exampleSynthesized example
{
"allow_without_pipeline": false,
"evaluated": false,
"passes": false,
"pipelines": [
{
"pipeline_id": "a6c9cc16-2552-4eae-ab99-7e6c1731a434",
"pipeline_name": "payments-api",
"stale": false,
"state": "passed"
},
{
"pipeline_id": "b4a83883-c801-42c1-b3af-aa6ed8c84be6",
"pipeline_name": "payments-api",
"stale": false,
"state": "passed"
}
],
"required": false,
"source_sha": "f909dbc5b6ecacbbe59d38be0eb5b63470d4edfe",
"state": "passed",
"target_sha": "19d53c3ab23efcf34071266b5ce6732d53dcb67d",
"refusal": "matched"
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-cd72",
"message": "Pin a page's payload to the build that rendered it"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-b18c",
"message": "Label every synthesized example"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-b3bd",
"message": "Inline scalar newtypes but keep their brand"
}
}
404Not foundapplication/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-cd7b",
"message": "Draw the region map from operation density"
}
}
CLI
gitmoap mr get-pipelines
- --repo-ididRepository ID (id or owner/repo path)
- --mr-ididMerge request ID