diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ecc0ffa5804..5256513d790 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -76,8 +76,8 @@ jobs: id: compute-test-matrix env: compute_all_targets: ${{ contains(github.event.pull_request.title, '[RunAllTests]') }} - # See: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request. - base_commit_hash: ${{ github.event.pull_request.base.sha }} + # See: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request. Defer to origin/develop outside a PR (such as develop's main CI runs). + base_commit_hash: ${{ github.event.pull_request.base.sha || 'origin/develop' }} # https://unix.stackexchange.com/a/338124 for reference on creating a JSON-friendly # comma-separated list of test targets for the matrix. run: |