diff --git a/tools/actions/commit-queue.sh b/tools/actions/commit-queue.sh
index 6f629fdbe156d2..aad3309d7946d3 100755
--- a/tools/actions/commit-queue.sh
+++ b/tools/actions/commit-queue.sh
@@ -4,13 +4,13 @@ set -xe
OWNER=$1
REPOSITORY=$2
-GITHUB_TOKEN=$3
-shift 3
+shift 2
UPSTREAM=origin
DEFAULT_BRANCH=master
-API_URL=https://api.github.com
+COMMIT_QUEUE_LABEL="commit-queue"
+COMMIT_QUEUE_FAILED_LABEL="commit-queue-failed"
mergeUrl() {
echo "repos/${OWNER}/${REPOSITORY}/pulls/${1}/merge"
@@ -19,14 +19,14 @@ mergeUrl() {
commit_queue_failed() {
pr=$1
- gh pr edit $pr --add-label "${COMMIT_QUEUE_FAILED_LABEL}"
+ gh pr edit "$pr" --add-label "${COMMIT_QUEUE_FAILED_LABEL}"
# shellcheck disable=SC2154
cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
body="Commit Queue failed
$(cat output)
$cqurl "
echo "$body"
- gh pr comment $pr --body "$body"
+ gh pr comment "$pr" --body "$body"
rm output
}
@@ -36,7 +36,7 @@ git config --local user.email "github-bot@iojs.org"
git config --local user.name "Node.js GitHub Bot"
for pr in "$@"; do
- gh pr view $pr --json labels --jq ".labels" > labels.json
+ gh pr view "$pr" --json labels --jq ".labels" > labels.json
# Skip PR if CI was requested
if jq -e 'map(.name) | index("request-ci")' < labels.json; then
echo "pr ${pr} skipped, waiting for CI to start"
@@ -50,7 +50,7 @@ for pr in "$@"; do
fi
# Delete the commit queue label
- gh pr edit $pr --remove-label "$COMMIT_QUEUE_LABEL"
+ gh pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL"
if jq -e 'map(.name) | index("commit-queue-squash")' < labels.json; then
MULTIPLE_COMMIT_POLICY="--fixupAll"
diff --git a/tools/actions/start-ci.sh b/tools/actions/start-ci.sh
index ab184c889bd3e5..174939aa4c413b 100755
--- a/tools/actions/start-ci.sh
+++ b/tools/actions/start-ci.sh
@@ -2,11 +2,11 @@
set -xe
-REQUEST_CI_LABEL=request-ci
-REQUEST_CI_FAILED_LABEL=request-ci-failed
+REQUEST_CI_LABEL="request-ci"
+REQUEST_CI_FAILED_LABEL="request-ci-failed"
for pr in "$@"; do
- gh pr edit $pr --remove-label "$REQUEST_CI_LABEL"
+ gh pr edit "$pr" --remove-label "$REQUEST_CI_LABEL"
ci_started=yes
rm -f output;
@@ -15,11 +15,11 @@ for pr in "$@"; do
if [ "$ci_started" = "no" ]; then
# Do we need to reset?
- gh pr edit $pr --add-label "$REQUEST_CI_FAILED_LABEL"
+ gh pr edit "$pr" --add-label "$REQUEST_CI_FAILED_LABEL"
jq -n --arg content "Couldn't start CI
$(cat output)
" > output.json
- gh pr comment $pr --body-file output.json
+ gh pr comment "$pr" --body-file output.json
rm output.json;
fi