File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,20 @@ latest_release_number () {
11
11
12
12
branch_exists () {
13
13
# Check if the branch exists on the remote
14
- git ls-remote --heads origin " $1 " 2> /dev/null | grep -q " $1 " || echo 0
14
+ ret=$( git ls-remote --heads origin " $1 " 2> /dev/null | grep -q " $1 " ; echo $? )
15
+ if [ $ret -eq 0 ]; then echo 1; else echo 0; fi
15
16
}
16
17
17
18
pr_exists_and_open () {
18
19
# Check if the PR exists and is open on the remote
19
- gh pr view $1 --json state | jq -r ' .state' | grep -q " OPEN" || echo 0
20
+ ret=$( gh pr view $1 --json state | jq -r ' .state' | grep -q " OPEN" ; echo $? )
21
+ if [ $ret -eq 0 ]; then echo 1; else echo 0; fi
20
22
}
21
23
22
24
is_pr_approved () {
23
25
# Check if the PR needs review
24
- gh pr view $1 --json reviewDecision | jq -r ' .reviewDecision' | grep -q " APPROVED" || echo 0
26
+ ret=$( gh pr view $1 --json reviewDecision | jq -r ' .reviewDecision' | grep -q " APPROVED" ; echo $? )
27
+ if [ $ret -eq 0 ]; then echo 1; else echo 0; fi
25
28
}
26
29
27
30
xcframework_name () {
You can’t perform that action at this time.
0 commit comments