2828 if : ${{ env.SKIP_BENCHMARKS != '1' }}
2929 uses : actions/checkout@v4
3030 with :
31- ref : ${{ github.head_ref }}
31+ repository : ${{ github.event.pull_request.head.repo.full_name }}
32+ ref : ${{ github.event.pull_request.head.ref }}
3233 fetch-depth : 0
3334
3435 - name : Install GitHub CLI
@@ -38,11 +39,13 @@ jobs:
3839 sudo apt-get install -y gh
3940 echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
4041
41- # (1) — original skip- label check
42+ # (1) — first skip‑ label check
4243 - name : Check skip label
4344 if : ${{ env.SKIP_BENCHMARKS != '1' }}
4445 run : |
45- labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
46+ labels=$(gh pr view ${{ github.event.pull_request.number }} \
47+ --repo "${{ github.repository }}" \
48+ --json labels --jq '.labels[].name')
4649 if echo "$labels" | grep -q "skip-validate-benchmarks"; then
4750 echo "skip-validate-benchmarks label found — skipping benchmarks."
4851 echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
5861 - name : Check skip label
5962 if : ${{ env.SKIP_BENCHMARKS != '1' }}
6063 run : |
61- labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
64+ labels=$(gh pr view ${{ github.event.pull_request.number }} \
65+ --repo "${{ github.repository }}" \
66+ --json labels --jq '.labels[].name')
6267 if echo "$labels" | grep -q "skip-validate-benchmarks"; then
6368 echo "skip-validate-benchmarks label found — skipping benchmarks."
6469 echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
7580 - name : Check skip label
7681 if : ${{ env.SKIP_BENCHMARKS != '1' }}
7782 run : |
78- labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
83+ labels=$(gh pr view ${{ github.event.pull_request.number }} \
84+ --repo "${{ github.repository }}" \
85+ --json labels --jq '.labels[].name')
7986 if echo "$labels" | grep -q "skip-validate-benchmarks"; then
8087 echo "skip-validate-benchmarks label found — skipping benchmarks."
8188 echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
9198 - name : Check skip label
9299 if : ${{ env.SKIP_BENCHMARKS != '1' }}
93100 run : |
94- labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
101+ labels=$(gh pr view ${{ github.event.pull_request.number }} \
102+ --repo "${{ github.repository }}" \
103+ --json labels --jq '.labels[].name')
95104 if echo "$labels" | grep -q "skip-validate-benchmarks"; then
96105 echo "skip-validate-benchmarks label found — skipping benchmarks."
97106 echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
@@ -106,7 +115,9 @@ jobs:
106115 - name : Check skip label
107116 if : ${{ env.SKIP_BENCHMARKS != '1' }}
108117 run : |
109- labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
118+ labels=$(gh pr view ${{ github.event.pull_request.number }} \
119+ --repo "${{ github.repository }}" \
120+ --json labels --jq '.labels[].name')
110121 if echo "$labels" | grep -q "skip-validate-benchmarks"; then
111122 echo "skip-validate-benchmarks label found — skipping benchmarks."
112123 echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
@@ -118,11 +129,13 @@ jobs:
118129 chmod +x scripts/benchmark_action.sh
119130 scripts/benchmark_action.sh
120131
121- # (6) — final, unchanged
132+ # (6) — final check after run
122133 - name : Check skip label after run
123134 if : ${{ env.SKIP_BENCHMARKS != '1' }}
124135 run : |
125- labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
136+ labels=$(gh pr view ${{ github.event.pull_request.number }} \
137+ --repo "${{ github.repository }}" \
138+ --json labels --jq '.labels[].name')
126139 if echo "$labels" | grep -q "skip-validate-benchmarks"; then
127140 echo "skip-validate-benchmarks label was found — but benchmarks already ran."
128141 fi
0 commit comments