File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,18 +42,19 @@ jobs:
4242 - name : Checkout repo
4343 uses : actions/checkout@v6
4444
45- - name : Determine PR Number
45+ - name : Determine PR Data
4646 env :
4747 OWNER : ${{ github.repository_owner }}
4848 REPO : ${{ github.event.repository.name }}
4949 HEAD_BRANCH : ${{ github.event.workflow_run.head_branch }}
5050 FORK_OWNER : ${{ github.event.workflow_run.head_repository.owner.login }}
5151 GH_TOKEN : ${{ github.token }}
5252 run : |
53- PR_JSON=$(gh api \
54- -X GET "repos/$OWNER/$REPO/pulls?state=all&head=${FORK_OWNER}:${HEAD_BRANCH}")
55- PR_NUMBER=$(jq -r '.[0].number // empty' <<<"$PR_JSON")
56- echo "PR_NUM=$PR_NUMBER" >> $GITHUB_ENV
53+ PR_JSON=$(gh api -X GET "repos/$OWNER/$REPO/pulls?state=all&head=${FORK_OWNER}:${HEAD_BRANCH}")
54+ pr_num=$(jq -r '.[0].number // empty' <<<"$PR_JSON")
55+ pr_id=$(jq -r '.[0].node_id // empty' <<<"$PR_JSON")
56+ echo "PR_NUM=$pr_num" >> $GITHUB_ENV
57+ echo "PR_ID=$pr_id" >> $GITHUB_ENV
5758
5859 - name : Assign Author if no assignees
5960 env :
You can’t perform that action at this time.
0 commit comments