Skip to content
GitmoapAPIBeta
Schema

RepositoryBranch

Shape

  • aheadinteger · int320–∞
  • behindinteger · int320–∞
  • branch_nameBranchName (string)
  • commitCommit
    • The Commit schema
    • author_emailEmail (string)
    • author_namestring
    • authored_atstring
    • commit_shaCommitHash (string)
    • committed_atstring
    • committer_emailEmail (string)
    • committer_namestring
    • repository_idRepositoryId (string · uuid)
    • short_shaShortCommitHash (string)
    • titlestring
    • author_avatar_urlstring or nulloptional
    • committer_avatar_urlstring or nulloptional
    • messagestring or nulloptional
    • parent_shasarray of CommitHash (string)optional
    • tagsarray of TagName (string)optional
  • open_merge_requestsarray of BranchMergeRequestRefThe open merge requests proposing this branch — one per target branch at most. A commit to the branch updates each of them.
    • The BranchMergeRequestRef schema
    • iidMergeRequestId (integer · int64)The merge request's number in its repository.
    • target_branchBranchName (string)Where it proposes to merge the branch.
  • protectedbooleanA branch rule protects this branch.
  • repository_idRepositoryId (string · uuid)
  • viewer_can_pushbooleanWhether the caller may push to this branch — the same verdict a git push or a commit written in the browser gets. false for someone not signed in.
  • push_refusalstring or nulloptionalWhy the caller may not push here, in a sentence to show them. Absent when they may.

Example

Synthesized example
{
"ahead": 7,
"behind": 5,
"branch_name": "feat/run-header-stream",
"commit": {
"author_email": "lin@acme.example",
"author_name": "Lin Park",
"authored_at": "2026-10-09T22:48:14Z",
"commit_sha": "82b6e631d6965000823c674adf0d1d907626b17e",
"committed_at": "2026-10-13T21:34:27Z",
"committer_email": "mara@acme.example",
"committer_name": "payments-api",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"short_sha": "85c1d554157c027026e49012cc8af6bc9cf41e86",
"title": "Stream pipeline status into the run header",
"author_avatar_url": "https://gitmoap.example/acme/f3f7a9df",
"committer_avatar_url": "https://gitmoap.example/acme/1090f1e3",
"message": "Label every synthesized example",
"parent_shas": [
"4908a938724ac6a987595a9e843e5cfcfd3ff36e",
"5ef7deea79be7003e17193a3b0dfcbece43b1be0"
],
"tags": [
"tags-dd73"
]
},
"open_merge_requests": [
{
"iid": 42,
"target_branch": "main"
}
],
"protected": false,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"viewer_can_push": false,
"push_refusal": "push-refusal-f0f9"
}

Graph

Used by