@@ -4,13 +4,13 @@ set -xe
44
55OWNER=$1
66REPOSITORY=$2
7- GITHUB_TOKEN=$3
8- shift 3
7+ shift 2
98
109UPSTREAM=origin
1110DEFAULT_BRANCH=master
1211
13- API_URL=https://api.github.com
12+ COMMIT_QUEUE_LABEL=" commit-queue"
13+ COMMIT_QUEUE_FAILED_LABEL=" commit-queue-failed"
1414
1515mergeUrl () {
1616 echo " repos/${OWNER} /${REPOSITORY} /pulls/${1} /merge"
@@ -19,14 +19,14 @@ mergeUrl() {
1919commit_queue_failed () {
2020 pr=$1
2121
22- gh pr edit $pr --add-label " ${COMMIT_QUEUE_FAILED_LABEL} "
22+ gh pr edit " $pr " --add-label " ${COMMIT_QUEUE_FAILED_LABEL} "
2323
2424 # shellcheck disable=SC2154
2525 cqurl=" ${GITHUB_SERVER_URL} /${OWNER} /${REPOSITORY} /actions/runs/${GITHUB_RUN_ID} "
2626 body=" <details><summary>Commit Queue failed</summary><pre>$( cat output) </pre><a href='$cqurl '>$cqurl </a></details>"
2727 echo " $body "
2828
29- gh pr comment $pr --body " $body "
29+ gh pr comment " $pr " --body " $body "
3030
3131 rm output
3232}
3636git config --local user.name " Node.js GitHub Bot"
3737
3838for pr in " $@ " ; do
39- gh pr view $pr --json labels --jq " .labels" > labels.json
39+ gh pr view " $pr " --json labels --jq " .labels" > labels.json
4040 # Skip PR if CI was requested
4141 if jq -e ' map(.name) | index("request-ci")' < labels.json; then
4242 echo " pr ${pr} skipped, waiting for CI to start"
@@ -50,7 +50,7 @@ for pr in "$@"; do
5050 fi
5151
5252 # Delete the commit queue label
53- gh pr edit $pr --remove-label " $COMMIT_QUEUE_LABEL "
53+ gh pr edit " $pr " --remove-label " $COMMIT_QUEUE_LABEL "
5454
5555 if jq -e ' map(.name) | index("commit-queue-squash")' < labels.json; then
5656 MULTIPLE_COMMIT_POLICY=" --fixupAll"
0 commit comments