From 61ddc06361141d6d0d030666a8715d40108a67d1 Mon Sep 17 00:00:00 2001 From: Guillaume Mulocher Date: Fri, 5 Jul 2024 12:10:51 +0200 Subject: [PATCH 1/2] ci: Test for PR info (#744) --- .github/workflows/sonar.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 5d7b1b9a4..b4ead4986 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -32,3 +32,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: > + -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} + -Dsonar.pullrequest.key=${{ github.event.number }} + -Dsonar.pullrequest.branch=${{ github.event.head.ref }} + -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} From 864e251ddd2db0462a7ca6d494f1d9326ea92402 Mon Sep 17 00:00:00 2001 From: gmuloc Date: Fri, 5 Jul 2024 12:19:49 +0200 Subject: [PATCH 2/2] ci: Fix variable name --- .github/workflows/sonar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index b4ead4986..587e8fc81 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -36,5 +36,5 @@ jobs: args: > -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} -Dsonar.pullrequest.key=${{ github.event.number }} - -Dsonar.pullrequest.branch=${{ github.event.head.ref }} + -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}