tools: hide commit queue action link

PR-URL: https://github.com/nodejs/node/pull/36124
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
pull/36147/head
Antoine du Hamel 2020-11-14 19:10:12 +01:00 committed by Node.js GitHub Bot
parent 88d0b5b2fb
commit 08be03b7cb
1 changed files with 2 additions and 4 deletions

View File

@ -67,10 +67,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}"'"]}'
# Use printf to properly escape newline symbols for jq.
printf -v cqurl "\n\nCommit Queue action: %s/%s/%s/actions/runs/%s" \
"$GITHUB_SERVER_URL" "${OWNER}" "${REPOSITORY}" "$GITHUB_RUN_ID"
jq -n --arg content "<details><summary>Commit Queue failed</summary><pre>$(cat output)</pre></details>$cqurl" '{body: $content}' > output.json
cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
jq -n --arg content "<details><summary>Commit Queue failed</summary><pre>$(cat output)</pre><a href='$cqurl'>$cqurl</a></details>" '{body: $content}' > output.json
cat output.json
gitHubCurl "$(commentsUrl "$pr")" POST --data @output.json