File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ jobs:
28
28
- name : Check out the repo
29
29
uses : actions/checkout@v2
30
30
31
+
31
32
- name : Get PR number
32
33
run : |
33
- PR_NUMBER=$(curl --location --request GET 'https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open' \
34
- --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
35
- | jq '.[] | select(.head.ref=="'${{ github.ref }}'") | .number')
34
+ API_RESPONSE=$(curl --location --request GET 'https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open' \
35
+ --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}')
36
+ echo "API_RESPONSE: $API_RESPONSE"
37
+ PR_NUMBER=$(echo $API_RESPONSE | jq '.[] | select(.head.ref=="'${{ github.ref }}'") | .number')
36
38
if [ -z "$PR_NUMBER" ]; then
37
39
echo "PR_NUMBER is not set. Aborting."
38
40
exit 1
You can’t perform that action at this time.
0 commit comments