Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix Commit Queue failure comment #35599

Merged
merged 1 commit into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/actions/commit-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ 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}"'"]}'

cqurl="Commit Queue action: $GITHUB_SERVER_URL/${OWNER}/${REPOSITORY}/actions/runs/$GITHUB_RUN_ID"
jq -n --arg content "<details><summary>Commit Queue failed</summary><pre>$(cat output)</pre></details>\n$cqurl" '{body: $content}' > output.json
# 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
aduh95 marked this conversation as resolved.
Show resolved Hide resolved
cat output.json

gitHubCurl "$(commentsUrl "$pr")" POST --data @output.json
Expand Down