File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,25 @@ name: Sonar
2
2
' on ' :
3
3
push :
4
4
branches :
5
- - main
5
+ - " ** "
6
6
pull_request_target :
7
7
branches :
8
- - main
8
+ - " **"
9
+ types : [opened, synchronize, reopened, labeled]
9
10
schedule :
10
11
- cron : 0 14 * * *
11
12
jobs :
12
13
sonarcloud :
13
14
runs-on : ubuntu-latest
14
15
steps :
15
- - uses : actions/checkout@v2
16
- with :
17
- fetch-depth : 0
18
16
- name : Check for external PR
19
17
if : ${{ !(contains(github.event.pull_request.labels.*.name, 'safe') ||
20
18
github.event.pull_request.head.repo.full_name == github.repository ||
21
19
github.event_name != 'pull_request_target') }}
22
20
run : echo "Unsecure PR, must be labelled with the 'safe' label, then run the workflow again" && exit 1
21
+ - uses : actions/checkout@v3
22
+ with :
23
+ ref : ${{ github.event.pull_request.head.sha }}
23
24
- name : Use Node.js 13
24
25
uses : actions/setup-node@v1
25
26
with :
43
44
-Dsonar.tests=./test
44
45
-Dsonar.coverage.jacoco.xmlReportPaths=test-results.xml
45
46
-Dsonar.javascript.lcov.reportPaths=.nyc_output/coverage.lcov
47
+ -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
48
+ -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
You can’t perform that action at this time.
0 commit comments