From 0738d14fa45068ae637d4878ce287475aeea0fc3 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 28 Oct 2022 06:45:35 -0500 Subject: [PATCH] tools: fix `request-ci-failed` comment Refs: https://github.com/nodejs/node/pull/45209#issuecomment-1294239904 PR-URL: https://github.com/nodejs/node/pull/45218 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng Reviewed-By: Moshe Atlow --- tools/actions/start-ci.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/actions/start-ci.sh b/tools/actions/start-ci.sh index a34f2a9496fb26..adf201f43b9332 100755 --- a/tools/actions/start-ci.sh +++ b/tools/actions/start-ci.sh @@ -17,10 +17,13 @@ for pr in "$@"; do # Do we need to reset? gh pr edit "$pr" --add-label "$REQUEST_CI_FAILED_LABEL" - jq -n --arg content "
Couldn't start CI
$(cat output || true)
" > output.json + # shellcheck disable=SC2154 + cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + body="
Failed to start CI
$(cat output)
$cqurl
" + echo "$body" - gh pr comment "$pr" --body-file output.json + gh pr comment "$pr" --body "$body" - rm output.json; + rm output fi done;