Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
mirooon committed Feb 17, 2025
1 parent 496a86b commit 8e46b28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/securityAlertsReview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,20 @@ jobs:
COMMENT_BODY+="⚠️ **Please provide a dismissal reason for these alerts.**\n\n"
fi
echo "COMMENT_BODY"
echo $COMMENT_BODY
COMMENT_BODY_JSON=$(jq -Rs . <<< "$COMMENT_BODY")
if [[ -n "$EXISTING_COMMENT_ID" ]]; then
HTTP_RESPONSE=$(curl -s -o response.json -w "%{http_code}" -X PATCH \
-H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: application/json" \
-d "{\"body\": $COMMENT_BODY_JSON}" \
-d "{\"body\": $COMMENT_BODY}" \
"https://api.github.com/repos/${{ github.repository }}/issues/comments/${EXISTING_COMMENT_ID}")
else
HTTP_RESPONSE=$(curl -s -o response.json -w "%{http_code}" -X POST \
-H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: application/json" \
-d "{\"body\": $COMMENT_BODY_JSON}" \
-d "{\"body\": $COMMENT_BODY}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments")
fi
Expand Down

0 comments on commit 8e46b28

Please sign in to comment.