Skip to content

Mark a branch an experiment, or land it when ready

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

Each field given is changed; the others are left as they are. autoLand lands the branch (as the caller) once checks, the review and threads allow it.

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

BranchState

Media typeapplication/json
object
branch
required
string
experiment
required
boolean
autoLand
required
Any of:
object
by
required
string
since
required
Any of:
number
waiting
required
Any of:
string
overlaps
required
Array<object>
object
branch
required
string
paths
required
Array<string>
landing
required
Any of:
object
sha
required
string
branch
required
Any of:
string
title
required
string
landedBy
required
string
landedAt
required
Any of:
number
Example
{
"autoLand": {
"since": "Infinity"
},
"landing": {
"landedAt": "Infinity"
}
}

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"
}