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. It is also refused unless the repository has a merge queue whose GitHub settings allow impacted targets from fork pull requests.
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.
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.
Response
The targets were accepted