File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change 12
12
name : " CodeQL"
13
13
14
14
on :
15
- pull_request :
16
15
push :
17
16
paths :
18
17
- " **.cs"
35
34
permissions :
36
35
# required for all workflows
37
36
security-events : write
38
- pull-requests : write
39
37
40
38
# only required for workflows in private repositories
41
39
actions : read
89
87
uses : github/codeql-action/analyze@v3
90
88
with :
91
89
category : " /language:${{matrix.language}}"
92
-
93
- - name : Check CodeQL Results
94
- if : ${{ github.event_name == 'pull_request' }}
95
- id : check_codeql
96
- run : |
97
- if [ -f /home/runner/work/AzzyBot/results/csharp.sarif ]; then
98
- RESULTS=$(jq '.runs[].results | length' /home/runner/work/AzzyBot/results/csharp.sarif)
99
- echo "results=$RESULTS" >> "$GITHUB_OUTPUT"
100
- else
101
- echo "results=0" >> "$GITHUB_OUTPUT"
102
- fi
103
-
104
- - name : Try approving PR
105
- if : ${{ steps.check_codeql.outputs.results == '0' && github.event_name == 'pull_request' }}
106
- run : |
107
- gh pr review ${{ github.event.pull_request.number }} --approve
108
- env :
109
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments