Reference

Merge branches

Merges one branch into another. Merges into the same branch run one at a time.

POST
/namespaces/{namespace}/merges

A merge with conflicts saves nothing and answers 409 with the paths. To finish it, send the merge again with resolve covering them.

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

namespace*string

A namespace of your organization, such as prod/app, or <org>:<namespace> for a public namespace of another one. Encode / as %2F.

Request Body

application/json
  1. body
from*string

The branch to merge in.

Match^[A-Za-z0-9_-][A-Za-z0-9._-]*(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$
Lengthlength <= 200
into*string

The branch that receives the merge. It may be protected.

Match^[A-Za-z0-9_-][A-Za-z0-9._-]*(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$
Lengthlength <= 200
message?string
Length1 <= length <= 10000
dry_run?boolean

Only report the conflicts a merge would have now, less those resolve covers.

Defaultfalse
resolve?array<>

How to settle conflicts, by path. A path's resolution also settles the conflicts inside it. With every conflict covered, the merge lands as one merge commit with both parents.

Itemsitems <= 10000

Response Body

The merge landed, or the dry run's conflicts.

application/json
  1. response
head*|

The new head of into, when the merge landed.

conflicts*array<string>

Paths changed on both sides in ways that do not combine.

Example Request
curl -X POST 'https://example.com/v1/namespaces/string/merges' \  -H 'Content-Type: application/json' \  -d '{  "from": "string",  "into": "string"}'
Example Response
{  "head": "string",  "conflicts": [    "string"  ]}