Commit Queue failed
$(sed -e 's/&/\&/g' -e 's/\</g' -e 's/>/\>/g' output)
$cqurl "
echo "$body"
- gh pr comment "$pr" --body "$body"
+ gh -R "$GITHUB_REPOSITORY" pr comment "$pr" --body "$body"
rm output
}
@@ -34,7 +30,7 @@ git config --local user.name "Node.js GitHub Bot"
SHOULD_ABORT=
for pr in "$@"; do
- gh pr view "$pr" --json labels --jq ".labels" > labels.json
+ gh -R "$GITHUB_REPOSITORY" 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"
@@ -42,7 +38,7 @@ for pr in "$@"; do
fi
# Skip PR if CI is still running
- if gh pr checks "$pr" | grep -q "\spending\s"; then
+ if gh -R "$GITHUB_REPOSITORY" pr checks "$pr" | grep -q "\spending\s"; then
echo "pr ${pr} skipped, CI still running"
continue
fi
@@ -98,7 +94,7 @@ for pr in "$@"; do
--arg body "${commit_body}" \
--arg head "${commit_head}" \
'{merge_method:"squash",commit_title:$title,commit_message:$body,sha:$head}' |\
- gh api -X PUT "repos/${OWNER}/${REPOSITORY}/pulls/${pr}/merge" --input -\
+ gh api -X PUT "repos/${GITHUB_REPOSITORY}/pulls/${pr}/merge" --input -\
--jq 'if .merged then .sha else halt_error end'
)"; then
commit_queue_failed "$pr"
@@ -108,12 +104,12 @@ for pr in "$@"; do
rm output
- gh pr comment "$pr" --body "Landed in $commits"
+ gh -R "$GITHUB_REPOSITORY" pr comment "$pr" --body "Landed in $commits"
- [ -z "$MULTIPLE_COMMIT_POLICY" ] && gh pr close "$pr"
+ [ -z "$MULTIPLE_COMMIT_POLICY" ] && gh -R "$GITHUB_REPOSITORY" pr close "$pr"
# Delete the commit queue label (but ignore errors, it's no big deal if a closed PR still has the label)
- gh pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL" || true
+ gh -R "$GITHUB_REPOSITORY" pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL" || true
done
rm -f labels.json
diff --git a/tools/actions/start-ci.sh b/tools/actions/start-ci.sh
index 4d4fadf958a9..a499a27d8d46 100755
--- a/tools/actions/start-ci.sh
+++ b/tools/actions/start-ci.sh
@@ -6,7 +6,7 @@ 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 -R "$GITHUB_REPOSITORY" pr edit "$pr" --remove-label "$REQUEST_CI_LABEL"
ci_started=yes
rm -f output;
@@ -15,14 +15,14 @@ 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 -R "$GITHUB_REPOSITORY" pr edit "$pr" --add-label "$REQUEST_CI_FAILED_LABEL"
# shellcheck disable=SC2154
cqurl="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
body="