Skip to content

Commit fad9fe2

Browse files
committed
fix: update PR comment condition to check for results count instead of output value
1 parent 5208554 commit fad9fe2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/slither.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ jobs:
3131
value="${value//$'\n'/'%0A'}"
3232
value="${value//$'\r'/'%0D'}"
3333
echo "value=${value}" >> $GITHUB_OUTPUT
34+
count=$(jq '[.runs[].results[]] | length' results.sarif 2>/dev/null || echo 0)
35+
echo "results_count=${count}" >> $GITHUB_OUTPUT
3436
3537
- name: Create/update checklist as PR comment
36-
if: ${{ github.event_name == 'pull_request' && steps.formatted_slither.outputs.value != '' }}
38+
if: ${{ github.event_name == 'pull_request' && steps.formatted_slither.outputs.results_count != '0' }}
3739
uses: actions/github-script@v6
3840
with:
3941
script: |

0 commit comments

Comments
 (0)