Re-run a pull request's failed checks
Requires the Merge and cancel PRs permission. Re-runs the failed jobs of the GitHub Actions workflows behind the failed required checks, and keeps the pull request’s place in the queue: it stays in pendingFailure until the re-run starts or rerun.until passes, whichever is first. If the re-run has not started by then, the pull request fails as it would have without the request. Only possible while the entry is in pendingFailure on a queue that keeps failed test runs; every refusal is a 422 with its own code.
mode is required. Disruptive with mode: now: it stops the jobs still running in the failed checks’ workflows. mode: wait lets them finish first. now on a request that is waiting switches it to now (rerun.switchedToNow). Idempotency-Key is not honored, but a repeat with the same mode is safe: it answers rerun.alreadyHeld and changes nothing.
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 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
Body
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.
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.