We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f3bb41 commit 89e6ec1Copy full SHA for 89e6ec1
1 file changed
.github/workflows/sonarcloud.yml
@@ -64,6 +64,10 @@ jobs:
64
- name: Resolve PR number
65
id: pr
66
run: |
67
+ if [ "${{ github.event.workflow_run.event }}" != "pull_request" ]; then
68
+ echo "is_pr=false" >> "$GITHUB_OUTPUT"
69
+ exit 0
70
+ fi
71
PR_NUMBER=$(gh api \
72
"repos/${{ github.repository }}/commits/${{ github.event.workflow_run.head_sha }}/pulls" \
73
--jq '.[0].number // empty')
@@ -82,7 +86,7 @@ jobs:
82
86
args: >
83
87
-Dsonar.pullrequest.key=${{ steps.pr.outputs.number }}
84
88
-Dsonar.pullrequest.branch=${{ github.event.workflow_run.head_branch }}
85
- -Dsonar.pullrequest.base=${{ github.event.workflow_run.event == 'pull_request' && 'master' || 'master' }}
89
+ -Dsonar.pullrequest.base=master
90
env:
91
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
92
SONAR_HOST_URL: https://sonarcloud.io
0 commit comments