From 99c3436834da7f6b7589ef064aece58f000b1fe3 Mon Sep 17 00:00:00 2001 From: Phil Vendola Date: Mon, 16 Nov 2026 16:06:16 +0000 Subject: [PATCH] docs(api): list the read of a pull request's impacted targets GET /v2/pull-requests/{id}/impacted-targets is in openapi-v2.json but had no sidebar entry, so no page. List it beside the upload, and point the GitHub Actions guide at it for post-merge jobs. Co-Authored-By: Claude Opus 5.5 --- docs.json | 3 ++- merge-queue/optimizations/parallel-queues/github-actions.mdx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs.json b/docs.json index 898a21f6..79263d8c 100644 --- a/docs.json +++ b/docs.json @@ -823,7 +823,8 @@ "directory": "/api" }, "pages": [ - "PUT /v2/impacted-targets" + "PUT /v2/impacted-targets", + "GET /v2/pull-requests/{id}/impacted-targets" ] }, { diff --git a/merge-queue/optimizations/parallel-queues/github-actions.mdx b/merge-queue/optimizations/parallel-queues/github-actions.mdx index 5dabebe5..3ec28d2b 100644 --- a/merge-queue/optimizations/parallel-queues/github-actions.mdx +++ b/merge-queue/optimizations/parallel-queues/github-actions.mdx @@ -65,6 +65,8 @@ Impacted targets apply to one commit. Upload again on every push, or the queue k The upload answers `202`, and the queue picks the targets up shortly after. To confirm, once the pull request is in a queue, read it with an API key through [`GET /v2/pull-requests/{id}`](/api/pullrequests/get-a-pull-request) and check that `queueEntry.readiness.hasImpactedTargets` is `true`. +To reuse the targets after the pull request merges, for example to run only the post-merge jobs they affect, read them back with an API key through [`GET /v2/pull-requests/{id}/impacted-targets`](/api/pullrequests/get-a-pull-requests-impacted-targets). It returns the targets uploaded for the pull request's head commit, so a squash merge doesn't change the answer. The GitHub Actions login can't make this read. + The [Bazel](/merge-queue/optimizations/parallel-queues/bazel) and [Nx](/merge-queue/optimizations/parallel-queues/nx) actions compute the targets and upload them in one step. With `auth: github-actions`, they log in through `trunk-io/login` and upload through the v2 API. For other build tools, write the targets to a file and upload it as above. Declare the pull request's impact with one of: