v2

latestOpenAPI 3.1.0UNLICENSED2026-07-26210239.8 KB

List pull requests in a merge queue.

Returns a paginated list of pull requests in the merge queue. Optionally filter by state and/or by a time range for concluded pull requests.

post/listPullRequests

Request body

targetBranchstring required

The target branch of the merge queue.

state'not_ready' | 'pending' | 'testing' | 'tests_passed' | 'merged' | 'failed' | 'cancelled' | 'pending_failure'

Optional filter for the state of pull requests. If not provided, pull requests of all states will be returned.

sincestring date-time

Optional ISO 8601 timestamp. When provided, returns pull requests that concluded (merged, failed, or cancelled) since this time.

cursorstring uuid

Optional cursor for pagination. Use the nextCursor from the previous response.

takeinteger

Number of pull requests to return (1-100). Defaults to 50.

Example request

{
  "repo": {
    "host": "github.com",
    "owner": "trunk-io",
    "name": "trunk"
  },
  "targetBranch": "main",
  "since": "2024-01-01T00:00:00Z"
}

Response

OK

nextCursorstring uuid

Cursor for the next page of results. If absent, there are no more results.