File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 ;;
4343 *)
4444 gh api --method POST "repos/${REPO}/issues/${PR_NUMBER}/comments" \
45- -f body="Only maintainers with write access can authorize Agentic CI checks." >/dev/null
45+ -f body="Only maintainers with write access can authorize Agentic CI checks." >/dev/null || \
46+ echo "::warning::Unable to post permission failure comment."
4647 exit 1
4748 ;;
4849 esac
@@ -91,13 +92,17 @@ jobs:
9192 run : |
9293 comment() {
9394 gh api --method POST "repos/${REPO}/issues/${PR_NUMBER}/comments" \
94- -f body="$1" >/dev/null
95+ -f body="$1" >/dev/null || \
96+ echo "::warning::Unable to post authorization failure comment."
9597 }
9698
9799 comment_file() {
98- jq -n --rawfile body "$1" '{body: $body}' > /tmp/agentic-ci-auth-comment.json
100+ tmp=$(mktemp)
101+ trap 'rm -f "$tmp"' RETURN
102+ jq -n --rawfile body "$1" '{body: $body}' > "$tmp"
99103 gh api --method POST "repos/${REPO}/issues/${PR_NUMBER}/comments" \
100- --input /tmp/agentic-ci-auth-comment.json >/dev/null
104+ --input "$tmp" >/dev/null || \
105+ echo "::warning::Unable to post authorization failure comment."
101106 }
102107
103108 if [ "$STATE" != "open" ]; then
You can’t perform that action at this time.
0 commit comments