How do we create parallel queues?
By understanding which Bazel targets a pull request affects, we can build a real-time graph and detect intersection points and where distinct non-overlapping graphs exist. This information is essentially a list of unique target names, which can then be used in real time to understand along which targets pull requests might overlap. Calculating impacted targets in GitHub Actions
Trunk ships a GitHub action that will generate the list of impacted targets for a pull request and post that information to the Trunk Merge Queue service.
auth: github-actions logs the job in to Trunk with the run’s own GitHub credential through trunk-io/login, so there’s no Trunk secret to store, and the action uploads through the v2 API. On a public repository it also works on fork pull requests once an admin allows them. On a private repository, fork pull requests can’t upload impacted targets. The login runs only on Linux (x64 or arm64) and macOS (arm64) runners; elsewhere, use a stored token. If the login or upload fails, the step doesn’t fail the job, so check its log if a pull request waits for impacted targets.
To use a stored token instead, leave out auth and id-token: write, and pass trunk-token: ${{ secrets.TRUNK_API_TOKEN }}. Set that secret to your organization API token, from the Organization API token (v1) section of Settings → Developer → API Keys. This uploads through the v1 /setImpactedTargets endpoint, which will be deprecated soon; API keys don’t work. Fork pull requests get no secrets by default, so they can’t upload with a token.