File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ PR_BRANCH_NAME=${1:?Must provide name of PR branch to operate on.}
4
4
source repos
5
5
for product in " ${products[@]} " ; do
6
6
STATE=$( gh pr view ${PR_BRANCH_NAME} -R stackabletech/${product} -operator --jq ' .state' --json state)
7
- if [[ $STATE -eq " OPEN" ]]; then
7
+ if [[ " $STATE " == " OPEN" ]]; then
8
8
echo " Approving ${product} "
9
9
gh pr review ${PR_BRANCH_NAME} --approve -R stackabletech/${product} -operator
10
10
gh pr merge ${PR_BRANCH_NAME} -R stackabletech/${product} -operator
Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ set -euo pipefail
3
3
PR_BRANCH_NAME=${1:? Must provide name of PR branch to operate on.}
4
4
source repos
5
5
for product in " ${products[@]} " ; do
6
- STATE=$( gh pr view ${PR_BRANCH_NAME} -R stackabletech/${product} -operator --jq ' .state' --json state)
7
- gh pr checks ${PR_BRANCH_NAME} -R stackabletech/${product} -operator & > /dev/null
6
+ STATE=$( gh pr view ${PR_BRANCH_NAME} -R stackabletech/${product} -operator --jq ' .state' --json state)
7
+ # Disable -e option to the "set" command below because it causes the script to stop if checks are in progress.
8
+ set +e
9
+ gh pr checks ${PR_BRANCH_NAME} -R stackabletech/${product} -operator & > /dev/null
10
+ set -e
8
11
status=$?
9
12
echo " ${product} (${STATE} ): ${status} "
10
13
done
You can’t perform that action at this time.
0 commit comments