nx based affected targets
Nx is a popular build framework for monorepos that focuses in simplicity. Like many other distributed build frameworks, the core concept is around identifying the targets that are affected in a change, and using a build cache. These same concepts can also be used for optimizing MergeQueue builds.
GitHub Action
GitHub action might be the easiest way to fetch the affected targets and push that to Aviator API. Here’s an example of how you can setup such a GitHub Action. You can also find this code in action in nx-examples repository fork.
A few things to note
It is recommended to store the API access token as
AVIATOR_API_TOKEN
in GitHub secrets. or replace the secrets aboveThere are two separate
action
for thepull_request
API:update
andqueue
. If you useupdate
API, these affected targets information is sent to Aviator. A developer can then queue the PR asynchronously. If using theupdate
API, you should call this GitHub action every time a new commit is added to the PR.Alternatively, you can submit this as a
queue
action when the PR is ready to be queued. In that case, the information is submitted to the Aviator MergeQueue while queueing the PR in the same step.
Last updated