File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 6868 args : >
6969 "-Dsonar.organization=${{ github.repository_owner }}"
7070 "-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}"
71- "-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}"
71+ ${{ contains(github.event_name, 'pull_request') && format(' "-Dsonar.pullrequest.key={0}"', github.event.pull_request.number) || '' }}
7272 ${{ inputs.sonar-test-inclusions != '' && format('"-Dsonar.test.inclusions={0}"', inputs.sonar-test-inclusions) || '' }}
7373 ${{ inputs.sonar-exclusions != '' && format('"-Dsonar.exclusions={0}"', inputs.sonar-exclusions) || '' }}
7474 ${{ inputs.sonar-sources != '' && format('"-Dsonar.sources={0}"', inputs.sonar-sources) || '' }}
Original file line number Diff line number Diff line change 1010 branches :
1111 - " main"
1212 workflow_dispatch :
13+ inputs :
14+ sonar-config :
15+ description : " Configuration for Sonar"
16+ type : string
17+ default : " default"
18+ sonar-test-inclusions :
19+ description : " Glob pattern(s) for test files to include in Sonar analysis"
20+ type : string
21+ sonar-exclusions :
22+ description : " Glob pattern(s) for files to exclude from Sonar analysis"
23+ type : string
1324
1425permissions : {}
1526
2536 contents : read
2637 pull-requests : write
2738 id-token : write
39+ with :
40+ sonar-config : ${{ github.event.inputs.sonar-config }}
41+ sonar-test-inclusions : ${{ github.event.inputs.sonar-test-inclusions }}
42+ sonar-exclusions : ${{ github.event.inputs.sonar-exclusions }}
You can’t perform that action at this time.
0 commit comments