diff --git a/.buildkite/scripts/pr_test.sh b/.buildkite/scripts/pr_test.sh index 1836935ad..ea4a4167d 100755 --- a/.buildkite/scripts/pr_test.sh +++ b/.buildkite/scripts/pr_test.sh @@ -59,7 +59,11 @@ if [ -z "${TEST_TYPE:-}" ]; then fi log "Test type: $TEST_TYPE" -MODAL_ENV="BUILDKITE_REPO=$BUILDKITE_REPO BUILDKITE_COMMIT=$BUILDKITE_COMMIT BUILDKITE_PULL_REQUEST=$BUILDKITE_PULL_REQUEST IMAGE_VERSION=$IMAGE_VERSION" +EFFECTIVE_PR=${BUILDKITE_PULL_REQUEST:-false} +if [ "$EFFECTIVE_PR" = "false" ] && [ -n "${PR_NUMBER:-}" ]; then + EFFECTIVE_PR=$PR_NUMBER +fi +MODAL_ENV="BUILDKITE_REPO=$BUILDKITE_REPO BUILDKITE_COMMIT=$BUILDKITE_COMMIT BUILDKITE_PULL_REQUEST=$EFFECTIVE_PR IMAGE_VERSION=$IMAGE_VERSION" case "$TEST_TYPE" in "encoder") diff --git a/.github/workflows/ci-slash-commands.yml b/.github/workflows/ci-slash-commands.yml index 015cc840f..6e3d50460 100644 --- a/.github/workflows/ci-slash-commands.yml +++ b/.github/workflows/ci-slash-commands.yml @@ -152,7 +152,7 @@ jobs: branch: "${{ needs.parse-command.outputs.pr_branch }}" commit: "${{ needs.parse-command.outputs.pr_sha }}" message: "/test ${{ needs.parse-command.outputs.test_type }} on PR #${{ github.event.issue.number }}" - build_env_vars: '{"FULL_SUITE": "${{ needs.parse-command.outputs.full_suite }}", "TEST_TYPE": "${{ needs.parse-command.outputs.test_type }}"}' + build_env_vars: '{"FULL_SUITE": "${{ needs.parse-command.outputs.full_suite }}", "TEST_TYPE": "${{ needs.parse-command.outputs.test_type }}", "PR_NUMBER": "${{ github.event.issue.number }}"}' send_pull_request: "true" pull_request_id: "${{ github.event.issue.number }}" pull_request_base_branch: "main" diff --git a/.github/workflows/ci-trigger-full-suite.yml b/.github/workflows/ci-trigger-full-suite.yml index 494f24b61..f24a97dd9 100644 --- a/.github/workflows/ci-trigger-full-suite.yml +++ b/.github/workflows/ci-trigger-full-suite.yml @@ -58,7 +58,7 @@ jobs: branch: "${{ github.event.pull_request.head.ref }}" commit: "${{ github.event.pull_request.head.sha }}" message: "Full Suite for PR #${{ github.event.pull_request.number }}" - build_env_vars: '{"FULL_SUITE": "true"}' + build_env_vars: '{"FULL_SUITE": "true", "PR_NUMBER": "${{ github.event.pull_request.number }}"}' send_pull_request: "true" pull_request_id: "${{ github.event.pull_request.number }}" pull_request_base_branch: "main"