@@ -154,8 +154,8 @@ jobs:
154154 echo "test_cases=$TEST_CASES" >> "$GITHUB_OUTPUT"
155155 echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
156156
157- HEAD_REPO=$(gh api "$PR_URL" --jq '.head.repo.full_name')
158157 PR_SHA=$(gh api "$PR_URL" --jq '.head.sha')
158+ PR_NUMBER=$(gh api "$PR_URL" --jq '.number')
159159 echo "vllm_ascend_ref=$PR_SHA" >> "$GITHUB_OUTPUT"
160160
161161 if [ "$TEST_CASES" = "all" ]; then
@@ -164,19 +164,22 @@ jobs:
164164 exit 0
165165 fi
166166
167- # Fetch the matching test matrix from the exact PR commit (not branch HEAD,
168- # to match vllm_ascend_ref). Nightly reads nightly_config.yaml; weekly reads
169- # weekly_config.yaml. resolve_nightly_tests.py picks the non-empty one.
167+ # Fetch the matching test matrix from the PR head ref via pull/<num>/head,
168+ # which is accessible through the base repo without fork access permission.
169+ # Nightly reads nightly_config.yaml; weekly reads weekly_config.yaml.
170+ # resolve_nightly_tests.py picks the non-empty one.
171+ REPO='${{ github.event.client_payload.github.payload.repository.full_name }}'
170172 case "$COMMAND" in
171173 nightly)
172- NIGHTLY_MATRIX=$(gh api "repos/$HEAD_REPO /contents/.github/workflows/configs/nightly_config.yaml?ref=$PR_SHA " --jq '.content' 2>/dev/null || echo "")
174+ NIGHTLY_MATRIX=$(gh api "repos/$REPO /contents/.github/workflows/configs/nightly_config.yaml?ref=pull/$PR_NUMBER/head " --jq '.content' 2>/dev/null || echo "")
173175 ;;
174176 weekly)
175- WEEKLY_MATRIX=$(gh api "repos/$HEAD_REPO /contents/.github/workflows/configs/weekly_config.yaml?ref=$PR_SHA " --jq '.content' 2>/dev/null || echo "")
177+ WEEKLY_MATRIX=$(gh api "repos/$REPO /contents/.github/workflows/configs/weekly_config.yaml?ref=pull/$PR_NUMBER/head " --jq '.content' 2>/dev/null || echo "")
176178 ;;
177179 esac
178180 export NIGHTLY_MATRIX
179181 export WEEKLY_MATRIX
182+ export TEST_CASES
180183
181184 python3 .github/workflows/scripts/resolve_nightly_tests.py --mode=dispatch
182185
0 commit comments