File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 12
12
steps :
13
13
- uses : actions/checkout@v3
14
14
with :
15
- ref : ${{ github.event.workflow_run.head_sha }} # checkout commit that triggered this workflow
15
+ repository : ${{ github.event.workflow_run.head_repository.full_name }}
16
+ ref : ${{ github.event.workflow_run.head_branch }} # checkout commit that triggered this workflow
16
17
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
17
18
18
19
# fetch develop so that Sonar can identify new issues in PR builds
56
57
args : >
57
58
-Dsonar.projectVersion=${{ steps.version.outputs.tag }}
58
59
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
60
+ -Dsonar.pullrequest.key=${{ github.event.workflow_run.pull_requests[0].number }}
61
+ -Dsonar.pullrequest.branch=${{ github.event.workflow_run.pull_requests[0].head.ref }}
62
+ -Dsonar.pullrequest.base=${{ github.event.workflow_run.pull_requests[0].base.ref }}
59
63
env :
60
64
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
61
65
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments