Skip to main content
POST
Re-run a pull request's failed checks

Authorizations

Authorization
string
header
required

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 key with none can read merge queues but change nothing in them. Permissions cover merge queues and test-result uploads, including the quarantine lookups a CI run makes before it uploads; any key can call the other Flaky Tests and Dynamic CI endpoints, including their writes.

Path Parameters

id
string<uuid>
required

The pull request's id.

Example:

"0f8fad5b-d9cb-469f-a165-70867728950e"

Body

application/json

mode is required: now stops the jobs still running in the failed checks' workflows and re-runs them with the failed jobs, and wait re-runs the failed jobs once those workflows finish. now on a request that is waiting switches it to now. Send the body as application/json; a missing body, or one without mode, is a 400.

mode
enum<string>
required

now: stop the jobs still running in the failed checks' workflows and re-run them with the failed jobs. wait: re-run the failed jobs once those workflows finish.

Available options:
now,
wait
Example:

"now"

Response

The pull request, and the re-run it is waiting for

The pull request after the request, and the re-run it is waiting for.

pullRequest
object
required

A pull request Trunk has indexed. There is no nested repository object — resolve repositoryId with GET /v2/repositories/{id}.

rerun
object
required

The accepted re-run request. requestedBy names the earlier requester when alreadyHeld is true and a user made that request.