Skip to content

List branches with head, base, author, ahead and behind, mergeable and checks

Answered at once from stored facts. ahead, behind, base and mergeable are computed on change, by a queue: when a branch is pushed, and in a sweep when main moves (the 100 open branches pushed most recently in the last 7 days). Until a row's facts are for the current main and head it is stale: true, with mergeable: "pending" and last_mergeable; a branch.updated event brings the fresh row. A list computes at most 25 rows itself, those stale for over 30 s (a branch no sweep reaches). The default branch is not in the list; its name and head are at the top.

Newest first, as GitHub lists active branches: an open branch by its last push, a merged one by its merge time; branches with the same time by name. Pages stay stable when two share a time: next_cursor holds the last row's time and name.

GET
https://app.gitpando.com/v1/monorepos/{owner}/{monorepo}/repos/{repo}/branches

Authorisation

  • credentialoptionalHTTP
  • sessionoptionalAPI key in cookie

Path parameters

  • ownerstringrequired

    The monorepo's owner, a namespace (a person's login or an organization). Matched without case.

    pattern: ^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$
  • monorepostringrequired

    The monorepo's name within its owner (or an old name). Matched without case.

    pattern: ^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$
  • repostringrequired

    The repo's name (projects-web).

Query parameters

  • stateoptionalopenormergedorall
    Default: "open"
  • limitoptionalinteger
    maximum: 500, minimum: 1
    Default: 100
  • cursoroptionalstring

    next_cursor from the previous page, as it came (the last row's time and name).

Returns

200

OK

JSON
  • default_branchstringrequired
  • default_headstring | nullrequired

    null while the repo is empty.

  • branchesarray ofobjectrequired
    24 properties
    • namestringrequired
    • headstringrequired
    • checksobjectrequired

      GitHub's combined status, plus the required contexts and which are missing.

      6 properties
      • shastring | nullrequired
      • statesuccessorpendingorfailureorerrorormissingorunknownrequired

        success when the merge gate passes; missing when a required context has not reported; unknown while the required checks are (an unforced merge is refused).

      • requiredarray | nullrequired

        Null while unknown.

      • checks_unknownstring | nullrequired

        Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.

      • statusesarray ofobjectrequired

        The latest status per context.

        8 properties
        • shastringrequired
        • contextstringrequired
        • statependingorsuccessorfailureorerrorrequired
        • created_atstringrequired
          format: date-time
        • target_urloptionalstring | null
        • descriptionoptionalstring | null
        • creatoroptionalstring

          The member who posted it (a login); app:<slug> for a status posted with a status token or by a CI integration; hook:<hook id> for a status token from a web hook with no app.

        • appoptionalstring | null

          The CI service that reported it (buildkite, github-actions, ...), stamped by Pando from a status token or a CI integration, never from the body or target_url. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.

      • missingoptionalarray ofstring
    • stateopenormergedrequired

      merged when the branch's current head was landed by a Pando merge.

    • baseoptionalstring | null

      The merge base with the default branch; null when there is none.

    • authoroptionalstring | null

      The user whose first push (or createBranch) made the branch.

    • titleoptionalstring | null
    • descriptionoptionalstring | null
    • aheadoptionalinteger | null

      Commits on the branch that are not on the default branch.

    • behindoptionalinteger | null

      Commits on the default branch that are not on the branch.

    • mergeableoptionalcleanorconflictsorup_to_dateorunknownorpending

      From the merge engine's dry run. up_to_date: the branch adds nothing. pending: not yet computed for the current main and head (see last_mergeable).

    • staleoptionalboolean

      True while ahead, behind, base and mergeable are not yet for the current main and head.

    • last_mergeableoptionalstring | null

      When stale: the last known mergeable answer.

    • conflict_pathsoptionalarray | null

      The paths changed differently on both sides, from the same dry run as mergeable (or last_mergeable while stale), so a branch page shows them before Merge is pressed. Null unless that answer is conflicts. No cap: the same list a refused merge's 409 carries in paths.

    • facts_atoptionalstring | null

      When the facts were computed.

      format: date-time
    • merge_commitoptionalstring | null
    • merged_byoptionalstring | null

      The user who merged (state merged only).

    • merged_atoptionalstring | null
      format: date-time
    • merged_machineoptionalstring | null

      The name of the credential used to merge: the machine or sandbox.

    • merged_agentoptionalstring | null

      The agent that merged, from X-Pando-Agent, if one said so.

    • pushed_machineoptionalstring | null

      The name of the credential that last pushed the branch: the machine or sandbox.

    • forcedoptionalboolean | null

      True when the merge went past red or missing checks with force=1.

    • created_atoptionalstring | null
      format: date-time
    • updated_atoptionalstring | null
      format: date-time
  • next_cursorstring | nullrequired

    Pass as cursor for the next page; null on the last.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close