Skip to content

Commit f22179e

Browse files
codacy
Signed-off-by: tech0priyanshu <priyanshuyadv101106@gmail.com>
1 parent fed2645 commit f22179e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/scripts/bot-pr-gfi-review-triage.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,12 @@ resp=$(curl -fS -X POST -H "Authorization: Bearer $TOKEN" -H "Accept: applicatio
7777
-d "{\"body\": $(jq -n --arg b "$BODY_TEXT" '$b')}" \
7878
"https://api.github.com/repos/$OWNER/$REPO/issues/$PR_NUMBER/comments")
7979

80-
echo "Comment posted successfully"
80+
# Use the response to avoid unused-variable warnings from static analyzers.
81+
comment_id=$(echo "$resp" | jq -r '.id // empty')
82+
if [ -n "$comment_id" ]; then
83+
echo "Comment posted successfully (id: $comment_id)"
84+
else
85+
# If the response didn't include an id, show the raw response for debugging.
86+
echo "Comment posted; response: $resp"
87+
fi
8188
exit 0

0 commit comments

Comments
 (0)