File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,14 +41,11 @@ jobs:
4141 sudo apt-get update
4242 sudo apt-get install -y unzip jq
4343
44- - name : Checkout base repo
45- uses : actions/checkout@v4
46- with :
47- fetch-depth : 1
48-
4944 - name : Determine PR number
5045 id : mode
5146 shell : bash
47+ env :
48+ GH_TOKEN : ${{ github.token }}
5249 run : |
5350 set -euo pipefail
5451
6158 exit 1
6259 fi
6360
61+ PR_HEAD_REF="$(gh pr view "$PR_NUMBER" --repo "${{ github.repository }}" --json headRefName --jq .headRefName)"
62+
6463 echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
64+ echo "pr_head_ref=$PR_HEAD_REF" >> "$GITHUB_OUTPUT"
65+
66+ - name : Checkout base repo
67+ uses : actions/checkout@v4
68+ with :
69+ fetch-depth : 0
70+
71+ - name : Fetch PR branch
72+ shell : bash
73+ run : |
74+ set -euo pipefail
75+ git fetch origin "${{ steps.mode.outputs.pr_head_ref }}"
6576
6677 - name : Resolve review state
6778 id : state
You can’t perform that action at this time.
0 commit comments