Upload a pull request's impacted targets
Requires the Merge and cancel PRs permission, or a GitHub Actions login for the run’s own repository. Records which build targets a pull request’s head sha impacts, for queues that gate on impacted targets. Address the pull request by exactly one of number or branch, and declare impact with exactly one of impactedTargets or impactsAllTargets: true. An empty impactedTargets array is a valid upload meaning the sha impacts nothing — it satisfies the queue’s has-impacted-targets gate, because that gate asks whether CI reported, not whether it reported a non-zero result. Supported only for GitHub and GitLab repositories; anything else returns IMPACTED_TARGETS_UNSUPPORTED. Answers 202: the targets are stored, but readiness is re-evaluated asynchronously, so a 202 does not mean readiness has changed yet.
A token from a GitHub Actions run may upload only for its own repository. One from a fork pull request’s run is bound to that pull request and its head sha: address the pull request by number, and send that sha, or the upload is refused with INSUFFICIENT_PERMISSIONS.
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.
Body
- Option 1
- Option 2
- Option 3
- Option 4
Address the pull request by exactly one of number or branch, and declare impact with exactly one of impactedTargets or impactsAllTargets: true. An empty impactedTargets array is valid and means the sha impacts nothing.
1^[A-Za-z0-9]+$"3f2c9a1b7e4d"
x <= 1000000010000011true Response
The targets were accepted