Skip to main content
POST
Add a pull request to an application's merge train

Authorizations

Authorization
string
header
required

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

Path Parameters

application_id
string<uuid>
required

Body

application/json
pull_request_number
integer
required
Required range: x >= 1
head_sha
string

Pins the head the train tests and merges. Omitted pins the head the train reads first; a later push to the pull request takes it out of the train.

Pattern: ^([a-f0-9]{40}|[a-f0-9]{64})$

Response

The pull request was already in the train.

id
string<uuid>
required
pull_request_number
integer
required
pull_request_head_sha
string
required

The head the train tests and merges; empty until the train first reads the pull request.

pull_request_title
string
required
base_branch
string
required

The branch the pull request merges into: the repository's default branch, for a stacked pull request too.

status
enum<string>
required
Available options:
queued,
building,
testing,
passed,
merging,
merged,
evicted,
cancelled
position
integer
required

Order in the train; lower merges first.

attempt
integer
required

How many cars were built for this pull request.

requested_by
string
required
requested_via
enum<string>
required
Available options:
api,
comment,
portal,
tool,
label,
auto_admit
enqueued_at
string<date-time>
required
updated_at
string<date-time>
required
pull_request_head_branch
string | null

The branch the pull request's head lives on; null until the train knows it. A pull request based on this branch is stacked on this entry.

parent_entry_id
string<uuid> | null

The entry this pull request is stacked on: it is based on that entry's head branch, is tested on that entry's car, and merges after it. Null for a pull request based on the base branch.

parent_pull_request_number
integer | null

The pull request of parent_entry_id.

car_branch
string | null
car_base_sha
string | null
Pattern: ^[a-f0-9]{40}$
car_commit_sha
string | null
Pattern: ^[a-f0-9]{40}$
car_tree_sha
string | null
Pattern: ^[a-f0-9]{40}$
predecessor_entry_id
string<uuid> | null
pipeline_run_id
string<uuid> | null

The merge_train run testing the car. Null for a car that rides in a batch: the run of the batch head tests it, named by tested_by_run_id.

tested_by_entry_id
string<uuid> | null

The entry whose run tests this entry's car: this entry when it has a run of its own, the head of its batch for a car that rides in one. Null when the entry has no car, when its batch has no head yet, or when the head is not among the entries in this response; null does not mean the car is untested.

tested_by_pull_request_number
integer | null

The pull request of tested_by_entry_id.

tested_by_run_id
string<uuid> | null

The merge_train run testing this entry's car: pipeline_run_id, or for a car that rides in a batch the run of the batch head.

merge_commit_sha
string | null
Pattern: ^[a-f0-9]{40}$
merge_tree_matches
boolean | null

Whether the merge landed as exactly the tree the car tested.

reason
string | null
reason_text
string | null
detail
string | null
started_at
string<date-time> | null
finished_at
string<date-time> | null