Skip to content
GitmoapAPIBeta
Schema

MergeCheckResponse

Shape

  • checksarray of MergeCheckItem
    • The MergeCheckItem schema
    • checkstring
    • statusMergeCheckStatuspassedfailed
    • blockingbooleanoptionalWhether this check failing stops the merge. false for an advisory check — pipeline_stale and restack_required — which reports something worth knowing and never blocks; mergeable is every blocking check passing.
    • caller_levelAccessLevelguestreporterdevelopermaintainerowneror nulloptional
    • evaluated_target_shastring or nulloptionalThe target tip a pipeline_stale run was evaluated against — the evidence the check is reporting on, so "stale" is inspectable rather than merely asserted.
    • messagestring or nulloptional
    • missing_approvalsarray of string or nulloptional
    • pipeline_run_idPipelineRunId (string · uuid) or nulloptionalThe run a client should be sent to first, when the check read one: for pipeline_result the first pipeline's run not to have passed, else the first; for pipeline_stale, the first stale run.
    • pipeline_stateMrPipelineStatependingrunningfailedpassedemptyor nulloptionalFor pipeline_result: the verdict over pipelines, the same value GET …/merge-requests/{mr_id}/pipelines reports as state. A failed item with no pipelines is otherwise three different answers — not decided yet, nothing applies, or the evaluation was refused — and only this and pipelines_evaluated tell them apart without reading message.
    • pipelinesarray of MrPipelineEntry or nulloptionalFor pipeline_result: every pipeline that applies to the merge request's head and where it stands. For pipeline_stale: each one whose run was tested against a target that has since moved.
      • 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 commit approve_pipeline_run names. 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_request for a run started for this merge request, push or manual for 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 untrusted run's result was reached without them, and a person approving commit_sha starts a trusted run that replaces it here. Absent when no run has started.
    • pipelines_evaluatedboolean or nulloptionalFor pipeline_result: whether the trigger engine has decided which pipelines apply to the head. false is the few seconds after a push, when the check waits rather than judges.
    • receivedinteger · int32 or nulloptional0–∞
    • requiredinteger · int32 or nulloptional0–∞
    • required_levelAccessLevelguestreporterdevelopermaintainerowneror nulloptional
    • rulesarray of ApprovalRuleStanding or nulloptionalFor the approvals check: every approval rule that applies, with each recorded approval and whether it counts toward that rule.
      • The ApprovalRuleStanding schema
      • approvalsarray of ApprovalStandingEvery recorded approval, with whether it counts toward this rule.
        • The ApprovalStanding schema
        • bystringThe approver's username.
        • countsboolean
        • principal_idPrincipalId (string · uuid)
        • reasonApprovalExclusionstalecannot_approvenot_an_approverservice_account_not_acceptedagent_not_acceptedsign_in_requiredauthorcommitterlast_pusheror nulloptionalWhy it does not count, when it does not.
      • namestring
      • receivedinteger · int320–∞Distinct approvals that count.
      • requiredinteger · int320–∞
      • rule_idApprovalRuleId (string · uuid)
      • satisfiedboolean
    • stack_mr_iidinteger · int64 or nulloptional0–∞The iid of the related stack member for the downstack_unmerged / restack_required checks.
    • unresolved_threadsinteger · int32 or nulloptional0–∞
    • unverified_criteriaarray of string or nulloptionalThe acceptance criteria that are not green at the MR head, for the issue_criteria check.
  • commits_aheadinteger · int320–∞
  • commits_behindinteger · int320–∞
  • has_conflictsboolean
  • mergeableboolean
  • source_branch_existsboolean
  • source_shastring
  • target_shastring
  • conflictsConflictSummary or nulloptionalWhen the branches conflict: how many files, whether they can be resolved in the browser, and whether you may resolve them, with the reason when you may not. Absent when the branches merge cleanly.
    • The ConflictSummary schema
    • file_countinteger · int320–∞How many files conflict.
    • resolvable_in_browserbooleanWhether they can all be resolved in the browser; when not, they are resolved with git.
    • viewer_can_resolvebooleanWhether the caller may resolve them: resolving pushes a merge commit to the merge request's branch, so this is whether they may push there.
    • resolve_refusalstring or nulloptionalWhy not, when they may not.

Example

Synthesized example
{
"checks": [
{
"check": "check-8c56",
"status": "passed"
}
],
"commits_ahead": 7,
"commits_behind": 6,
"has_conflicts": false,
"mergeable": true,
"source_branch_exists": false,
"source_sha": "4cdd581640a7fa32c600fa7678282c29760e2683",
"target_sha": "f046f40bdfa56a09f4a2fd6920502c8f998ceb1d",
"conflicts": {
"file_count": 2,
"resolvable_in_browser": false,
"viewer_can_resolve": false,
"resolve_refusal": "resolve-refusal-c95f"
}
}

Graph

Used inside

No schema contains this one.

Used by

Sent by 0 operations

No operation takes it as a request body.