Skip to content

Land a branch

POST
/api/orgs/{org}/projects/{project}/branches/land
curl --request POST \
--url https://api.wrktr.com/api/orgs/example/projects/example/branches/land \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "example", "force": true, "expectedHead": "example" }'

Merges the branch into the default branch with a merge commit, made by the server. Only when the branch already contains the default branch’s head, so the merge can’t conflict (BranchBehind otherwise), and only once it’s ready: checks pass, the review approves the head and no blocking thread is open (LandBlocked says what’s missing). force lands it anyway.

org
required
string
project
required
string
Media typeapplication/json
object
branch
required
string
force
Any of:
boolean
expectedHead
Any of:
string
Examplegenerated
{
"branch": "example",
"force": true,
"expectedHead": "example"
}

LandResult

Media typeapplication/json
object
branch
required
string
into
required
string
sha
required
string
Examplegenerated
{
"branch": "example",
"into": "example",
"sha": "example"
}

Unauthorized

Media typeapplication/json
object
_tag
required
string
Allowed values: Unauthorized
message
required
string
Example
{
"_tag": "Unauthorized"
}

ProjectNotFound | BranchNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ProjectNotFound
project
required
string
Example
{
"_tag": "ProjectNotFound"
}

BranchBehind | NothingToLand | BranchMoved | BranchIsExperiment | BranchClosed | LandBlocked

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: BranchBehind
branch
required
string
base
required
string
Example
{
"_tag": "BranchBehind"
}