Skip to content

Commit

Permalink
tools: fix request-ci-failed comment
Browse files Browse the repository at this point in the history
Refs: #45209 (comment)
PR-URL: #45218
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
aduh95 authored and RafaelGSS committed Nov 10, 2022
1 parent 02ebde3 commit 0738d14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/actions/start-ci.sh
Expand Up @@ -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 "<details><summary>Couldn't start CI</summary><pre>$(cat output || true)</pre></details>" > output.json
# shellcheck disable=SC2154
cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
body="<details><summary>Failed to start CI</summary><pre>$(cat output)</pre><a href='$cqurl'>$cqurl</a></details>"
echo "$body"

gh pr comment "$pr" --body-file output.json
gh pr comment "$pr" --body "$body"

rm output.json;
rm output
fi
done;

0 comments on commit 0738d14

Please sign in to comment.