File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
.github/actions/perform-static-analysis Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ description: "Perform SonarCloud static analysis"
44inputs :
55 sonar_organisation_key :
66 description : " Sonar organisation key, used to identify the project"
7- required : false
7+ required : true
88 sonar_project_key :
99 description : " Sonar project key, used to identify the project"
10- required : false
10+ required : true
1111 sonar_token :
1212 description : " Sonar token, the API key"
13- required : false
13+ required : true
1414
1515runs :
1616 using : " composite"
2020 with :
2121 path : coverage/
2222 pattern : coverage-*.xml
23+ merge-multiple : true
2324
2425 - name : " Find coverage files"
2526 id : coverage-files
@@ -51,13 +52,13 @@ runs:
5152 ARGS="$ARGS -Dsonar.python.coverage.reportPaths=$COV"
5253 fi
5354
54- # Explicit PR detection and parameter setting
55- if [ "$GITHUB_EVENT_NAME" = "pull_request" ] && [ -n "$PR_NUMBER" ]; then
55+ if [ "$GITHUB_EVENT_NAME" = "pull_request" ] && [ -n "$PR_NUMBER" ] && [ -n "$PR_HEAD_REF" ] && [ -n "$PR_BASE_REF" ]; then
56+ echo "Configuring for PR analysis"
5657 ARGS="$ARGS -Dsonar.pullrequest.key=$PR_NUMBER"
57- ARGS="$ARGS -Dsonar.pullrequest.branch=$PR_HEAD_REF"
58+ ARGS="$ARGS -Dsonar.pullrequest.branch=$PR_HEAD_REF"
5859 ARGS="$ARGS -Dsonar.pullrequest.base=$PR_BASE_REF"
5960 else
60- echo "Configuring for branch analysis: $BRANCH_NAME "
61+ echo "Configuring for branch analysis"
6162 ARGS="$ARGS -Dsonar.branch.name=$BRANCH_NAME"
6263 fi
6364
You can’t perform that action at this time.
0 commit comments