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.}
44source repos
55for product in " ${products[@]} " ; do
66 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
88 echo " Approving ${product} "
99 gh pr review ${PR_BRANCH_NAME} --approve -R stackabletech/${product} -operator
1010 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
33PR_BRANCH_NAME=${1:? Must provide name of PR branch to operate on.}
44source repos
55for 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
811 status=$?
912 echo " ${product} (${STATE} ): ${status} "
1013done
You can’t perform that action at this time.
0 commit comments