Get a pull request
Returns one pull request: its queue entry and readiness if it has ever been submitted to a queue, and ci, the head commit’s CI jobs counted with the URLs of the lists. ci.pollAfterSeconds says when to read the head commit’s CI again; it is null once nothing on that commit will change, even while the queue entry is still live, so to wait for a merge keep polling until queueEntry.state is merged, failed, or cancelled. A request that sends the last ETag in If-None-Match gets 304 when nothing changed.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the permissions it holds. A new key starts with no permissions: it can read merge queues but change nothing in them, and it cannot get a Dynamic CI plan. Each endpoint that needs a permission names it in its description; the Dynamic CI plan endpoints need Generate Dynamic CI plans.
Path Parameters
Response
The pull request
A pull request Trunk has indexed. There is no nested repository object — resolve repositoryId with GET /v2/repositories/{id}.
The head commit of the pull request as Trunk last indexed it. Compare against a verification run's testedPullRequests[].sha to tell whether a run tested the current head or a superseded one — a mismatch means the branch moved after that run started.
"9c58bf40e5c1a2b3d4e5f60718293a4b5c6d7e8f"