Skip to content

Create a branch on the server, off main by default

Points a new branch at from (default: main's head) with no new commit. The caller becomes the branch's author. 409 branch_exists if it exists. The answer has stale: true until the branch's facts are computed (a branch.updated event follows).

POST
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).

Request bodyJSONrequired

  • namestringrequired

    A git branch name, for example agent-3/oauth. Not the default branch.

  • fromoptionalstring

    A branch name or a full sha. Default: the default branch.

  • titleoptionalstring
  • descriptionoptionalstring

Returns

201

Created

JSON
  • 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

409

An error

JSON
  • errorobjectrequired
    4 properties
    • codestringrequired
    • messagestringrequired
    • pathsoptionalarray ofstring
    • checksoptionalobject

      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

503

repo_busy: the repo's write slots stayed taken for 120 s.

JSON
  • errorobjectrequired
    4 properties
    • codestringrequired
    • messagestringrequired
    • pathsoptionalarray ofstring
    • checksoptionalobject

      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
Navigation

Type to search…

↑↓ navigate↵ selectEsc close