From 5509c1b7e564c4ff2845bdcbb034805beb7be7c2 Mon Sep 17 00:00:00 2001 From: Denys Otrishko Date: Tue, 15 Sep 2020 11:29:55 +0300 Subject: [PATCH] build: add Commit Queue actions url to failure comment PR-URL: https://github.com/nodejs/node/pull/35206 Refs: https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables Reviewed-By: Mary Marchini Reviewed-By: Richard Lau Reviewed-By: Antoine du Hamel --- tools/actions/commit-queue.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/actions/commit-queue.sh b/tools/actions/commit-queue.sh index 028297217469a0..39f513256916f4 100755 --- a/tools/actions/commit-queue.sh +++ b/tools/actions/commit-queue.sh @@ -64,7 +64,8 @@ for pr in "$@"; do if ! tail -n 10 output | grep '. Post "Landed in .*/pull/'"${pr}"; then gitHubCurl "$(labelsUrl "$pr")" POST --data '{"labels": ["'"${COMMIT_QUEUE_FAILED_LABEL}"'"]}' - jq -n --arg content "
Commit Queue failed
$(cat output)
" '{body: $content}' > output.json + cqurl="Commit Queue action: $GITHUB_SERVER_URL/${OWNER}/${REPOSITORY}/actions/runs/$GITHUB_RUN_ID" + jq -n --arg content "
Commit Queue failed
$(cat output)
\n$cqurl" '{body: $content}' > output.json cat output.json gitHubCurl "$(commentsUrl "$pr")" POST --data @output.json