Skip to content

Commit 078be3b

Browse files
aduh95danielleadams
authored andcommitted
tools: fix request-ci-failed comment
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>
1 parent c890136 commit 078be3b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/actions/start-ci.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ for pr in "$@"; do
1717
# Do we need to reset?
1818
gh pr edit "$pr" --add-label "$REQUEST_CI_FAILED_LABEL"
1919

20-
jq -n --arg content "<details><summary>Couldn't start CI</summary><pre>$(cat output || true)</pre></details>" > output.json
20+
# shellcheck disable=SC2154
21+
cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
22+
body="<details><summary>Failed to start CI</summary><pre>$(cat output)</pre><a href='$cqurl'>$cqurl</a></details>"
23+
echo "$body"
2124

22-
gh pr comment "$pr" --body-file output.json
25+
gh pr comment "$pr" --body "$body"
2326

24-
rm output.json;
27+
rm output
2528
fi
2629
done;

0 commit comments

Comments
 (0)