Skip to content
GitmoapAPIBeta
Schema

MergeConflicts

A merge request's conflicts, between two heads.

A function of the two heads alone: the same pair always answers the same body, which is what lets it be cached by them. Whether the caller may resolve them is on merge-check.

Shape

  • filesarray of ConflictFile
    • The ConflictFile schema
    • kindConflictKindcontentadd_addmodify_deletedelete_modifybinarymoderenamefile_directorysubmoduleotherWhat kind of conflict a file has. Closed: a client offers different choices for each.
    • pathstring
    • resolvablebooleanWhether this file can be resolved in the browser.
    • sectionsarray of ConflictSectionThe file as runs and blocks, for a content or add_add conflict the browser can resolve. Empty for every other kind, which is resolved by a choice of the whole file.
    • old_pathstring or nulloptionalWhere the file was before a rename, when a rename is part of the conflict.
    • refusalstring or nulloptionalWhy not, when it cannot.
    • source_modeFileMode100644100755120000160000or nulloptionalThe file's mode on the merge request's branch; absent where that side has no file.
    • target_modeFileMode100644100755120000160000or nulloptionalThe file's mode on the target branch; absent where that side has no file.
  • resolvablebooleanWhether every conflict can be resolved in the browser. When false, refusal says why.
  • source_branchBranchName (string)
  • source_shaCommitHash (string)
  • target_branchBranchName (string)
  • target_shaCommitHash (string)
  • merge_base_shaCommitHash (string) or nulloptionalWhere the two branches diverged; absent when they share no history.
  • refusalRefusal or nulloptional
    • The Refusal schema
    • codeRefusalCodePERMISSION_REQUIREDBRANCH_PROTECTEDAGENT_REFFOREIGN_AUTHORPRIVILEGED_PATHBRANCH_NOT_FOUNDSTART_BRANCH_NOT_FOUNDFILE_NOT_FOUNDREPOSITORY_EMPTYMR_NOT_OPENNOT_CONFLICTEDHEAD_MOVEDBRANCH_EXISTSFILE_CHANGEDFILE_EXISTSPATH_CONFLICTUNSUPPORTED_ENTRYNOTHING_TO_COMMITUNRESOLVEDNOT_IN_CONFLICTUNSUPPORTED_CONFLICTPUSH_RULE_VIOLATIONWhat kind of refusal this is. Closed: a client branches on it. The wire spelling is the SCREAMING_SNAKE domain code that leads an error's message, so a refusal returned as data and the same refusal returned as an error read the same.
    • messagestringWhat is wrong, in a sentence a person can act on.
    • fieldstring or nulloptionalThe part of the request the refusal is about: message, branch, or actions[i] for the i-th file change.
    • rulestring or nulloptionalThe push rule that refused, by its setting's name (require_issue_reference), when code is PUSH_RULE_VIOLATION.

Example

Synthesized example
{
"files": [
{
"kind": "content",
"path": "path-4fc4",
"resolvable": false,
"sections": []
}
],
"resolvable": false,
"source_branch": "feat/run-header-stream",
"source_sha": "d472760a9c8b0bd712edd03576161a31df0dcd11",
"target_branch": "main",
"target_sha": "89daf4f2bdb5614f3d9ec080c40e34d80eb0695a",
"merge_base_sha": "768b15e8a8d7a9850050eeb90246cf54ad9bcd0f",
"refusal": {
"code": "PERMISSION_REQUIRED",
"message": "Draw the region map from operation density",
"field": "field-7166",
"rule": "rule-f98d"
}
}

Graph

Used inside

No schema contains this one.

Used by

Sent by 0 operations

No operation takes it as a request body.