File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,14 +43,18 @@ jobs:
4343 - name : Build
4444 env :
4545 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46- HEAD_SHA : ${{ github.event.pull_request.head.sha }}
46+ HEAD_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
47+ HEAD_REF : ${{ github.event.pull_request.head.ref || github.ref }}
48+ PR_NUMBER : ${{ github.event.pull_request.number }}
4749 run : |
50+ # For merge_group events, extract the PR number from the ref name
51+ # (e.g. gh-readonly-queue/main/pr-1234-<sha>)
4852 if [ -z "$PR_NUMBER" ] && [[ "$HEAD_REF" =~ ^gh-readonly-queue/.+/pr-([0-9]+)- ]]; then
4953 PR_NUMBER="${BASH_REMATCH[1]}"
5054 fi
5155 ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \
5256 --repo "${{ github.repository }}" \
5357 --branch "$HEAD_SHA" \
54- --pr-number "${{ github.event.pull_request.number }} " \
58+ --pr-number "$PR_NUMBER " \
5559 --run-id "${{ github.run_id }}"
5660 timeout-minutes : 120
You can’t perform that action at this time.
0 commit comments