Skip to main content
POST
Get a submitted pull request from a merge queue.

Authorizations

x-api-token
string
header
required

Body

application/json
repo
object
required
targetBranch
string
required
pr
By pull request number · object
required

The pull request to look up. Identify it by number or by head branch, but not both.

includeTimeline
boolean

When true, the response carries timeline: every state change the pull request went through, with timestamps and the details of each. Defaults to false.

Response

OK

stateChangedAt
string
required
priorityValue
number
required
priorityName
string
required
skipTheLine
boolean
required
forceEnqueued
boolean
required
isCurrentlySubmittedToQueue
boolean
required
prNumber
number
required
prTitle
string
required
prSha
string
required
prBaseBranch
string
required
prAuthor
string
required
verifiedByTestRun
object | null
required

The merge queue test run that verified this pull request before it was merged. For an optimistically merged pull request, this is the test run of the pull request behind it whose passing caused the optimistic merge. Null if the pull request is not merged, or was merged without a verifying test run (e.g. force merged).

id
string

This queue entry's ID. It identifies the entry, not the pull request — a pull request resubmitted after a cancellation gets a new one.

state
enum<string>

The state of a pull request in the merge queue. See https://docs.trunk.io/merge-queue/using-the-queue/reference#pull-request-states for the full description of each state.

Available options:
not_ready,
pending,
testing,
tests_passed,
merged,
failed,
cancelled,
pending_failure
readiness
object

Readiness signals for a pull request in the merge queue. A PR can start testing when doesBaseBranchMatch is true, gitHubMergeability is mergeable, and (when requiresImpactedTargets is true) hasImpactedTargets is true.

timeline
object[]

Present only when the request set includeTimeline.

usedDefaultPriorityName
string