Skip to content

Commit

Permalink
Fix jq expression for gh script
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed Dec 11, 2024
1 parent 68727d9 commit c362416
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ jobs:
-R '${{ github.repository }}' \
'${{ github.event.pull_request.number }}' \
--json comments \
-q '.comments | .[] | select(.author.login == "github-actions") | .body | contains("<!-- vulnerable-service -->\n# :warning: Vulnerabilities detected in")')
if [[ "$result" == 'true' ]]; then
-q '.comments | .[] | select(.author.login == "github-actions" and (.body | contains("<!-- vulnerable-service -->\n# :warning: Vulnerabilities detected in")))')
if [[ -n "$result" ]]; then
echo "Pull request comment was created successfully!"
else
echo "Pull request comment was not created."
Expand Down

0 comments on commit c362416

Please sign in to comment.