Skip to main content
PUT
Set a repository's merge train settings

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

repository_id
string<uuid>
required

Body

application/json
enabled
boolean
required
max_cars
integer

Omitted keeps the current value.

Required range: 1 <= x <= 8
auto_admit
enum<string>

Puts auto-admit in a mode; omitted keeps the current one. Switching it on makes the caller the member every pull request it admits is requested by, and is refused for a service account token. Asking for the mode it is already in keeps the member who put it there.

Available options:
off,
shadow,
on
auto_admit_criterion
enum<string>

Sets what auto-admit waits for; omitted keeps the current criterion. Moving it to ready is refused for a service account token. Enable ready only after cars run wave 3; try ready_shadow first.

Available options:
green,
ready_shadow,
ready
auto_admit_protected_paths
string[] | null

Sets the path patterns that keep the green criterion under ready; omitted keeps the current list, null restores the default list, and an empty list protects nothing. Changing the list is refused for a service account token.

Maximum array length: 50
Required string length: 1 - 256

Response

The stored settings.

enabled
boolean
required

Whether pull requests can enter the repository's merge train. Off by default.

max_cars
integer
required

How many pull requests are tested at once, each stacked on the ones ahead of it.

Required range: 1 <= x <= 8
auto_admit
enum<string>
required

Whether the merge train puts green pull requests in itself. While the train is on, an open, non-draft pull request from the repository itself, into the default branch, whose newest pull request run passed at its current head in the last 24 hours, opened by an organisation member or a writer, with no changes requested, no approval missing and no unresolved review thread, without the ankra:hold label, whose declared dependencies (Depends-on:) are merged with every check on their merge commit passed, and whose description names no open pull request of another repository it did not declare, enters the train - unless it already left the train at that head for a reason that would recur. shadow decides the same and records it in auto_admit_decisions without enqueueing anything. off by default.

Available options:
off,
shadow,
on
auto_admit_by
string | null
required

The member who put auto-admit in its current mode (user:): in on, every pull request auto-admit puts in the train is requested in their name. Null while auto-admit is off.

auto_admit_since
string<date-time> | null
required

When auto-admit entered its current mode. Null while it is off.

auto_admit_criterion
enum<string>
required

What auto-admit waits for before it puts a pull request in the train. green (the default): its newest pull request run passed, as described under auto_admit. ready: its newest pull request run at its current head has not failed - still running with no failed step, or passed at any age - and the host reports it merges cleanly; every other auto_admit rule still applies, a pull request touching one of auto_admit_protected_paths still waits for its run to pass, and an entry admitted at ready whose own run fails before its car passed is taken out of the train with reason pull_request_run_red. ready_shadow admits green and records in auto_admit_decisions what ready would have admitted (ready_shadow_admit). Enable ready only after cars run wave 3: until the repository's merge train cars run every check its pull request runs do, admitting at ready merges on a car that skipped them.

Available options:
green,
ready_shadow,
ready
auto_admit_protected_paths
string[]
required

Path patterns, with a pipeline paths filter's syntax (a leading ! excludes), whose pull requests keep the green criterion under ready. A pull request whose run did not record its full list of changed files keeps it too.

auto_admit_protected_paths_is_default
boolean
required

Whether auto_admit_protected_paths is the built-in default list (alembic/**, deploy/charts//values.yaml, deploy/charts//values.schema.json) rather than one the repository set.