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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
aduh95 authored and danielleadams committed Jan 3, 2023
1 parent c890136 commit 078be3b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/actions/start-ci.sh
Original file line number Diff line number Diff line change
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 078be3b

Please sign in to comment.