File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -45,21 +45,19 @@ jobs:
45
45
outputs :
46
46
PR_OPEN : ${{ steps.check_pr.outputs.pr_open }}
47
47
steps :
48
- - name : Checkout
49
- uses : actions/checkout@v2
50
-
51
48
- name : Check if PR is open
52
49
id : check_pr
53
50
run : |
54
51
set -euo pipefail
55
- pr_open=$(gh pr view --json state | jq -r '.state' != "OPEN")
56
- if [[ "$pr_open" = = "true" ]]; then
57
- echo "PR is closed. Exiting ."
58
- exit 0
52
+ pr_open=true
53
+ if [[ "$(gh pr view $PR_BRANCH --json state | jq -r '.state')" ! = "true" ]]; then
54
+ echo "PR doesn't exist or is closed."
55
+ pr_open=false
59
56
fi
60
57
echo "pr_open=$pr_open" >> $GITHUB_OUTPUT
61
58
env :
62
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
+ PR_BRANCH : ${{ github.ref }}
63
61
64
62
get_info :
65
63
needs : check_pr
You can’t perform that action at this time.
0 commit comments