You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2021/06/03 09:36:59 UTC

[iotdb] branch master updated: Disable pull_request_target for sonar check since it cannot load any PR revision information (#3314)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new fdbf23d  Disable pull_request_target for sonar check since it cannot load any PR revision information (#3314)
fdbf23d is described below

commit fdbf23d1dbf207eae48d7859242823811ef075c1
Author: Haonan <hh...@outlook.com>
AuthorDate: Thu Jun 3 17:36:41 2021 +0800

    Disable pull_request_target for sonar check since it cannot load any PR revision information (#3314)
---
 .github/workflows/sonar-coveralls.yml | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/sonar-coveralls.yml b/.github/workflows/sonar-coveralls.yml
index ab295bc..9ff99d1 100644
--- a/.github/workflows/sonar-coveralls.yml
+++ b/.github/workflows/sonar-coveralls.yml
@@ -10,6 +10,13 @@ on:
       - "rel/*"
     paths-ignore:
       - "docs/**"
+  pull_request:
+    branches:
+      - master
+      - "rel/*"
+      - cluster_new
+    paths-ignore:
+      - "docs/**"
   pull_request_target:
     branches:
       - master
@@ -44,7 +51,7 @@ jobs:
         # we do not compile client-cpp for saving time, it is tested in client.yml
         run: mvn -B clean post-integration-test -Dtest.port.closed=true -Pcode-coverage -P '!testcontainer'
       - name: Code Coverage (Coveralls)
-        if: ${{ success() }}
+        if: ${{ success() && (github.event_name == 'pull_request_target')}}
         run: |
           mvn -B post-integration-test -Pcode-coverage -pl code-coverage
           mvn -B coveralls:report \
@@ -54,7 +61,7 @@ jobs:
           -DrepoToken=${{ secrets.COVERALL_TOKEN }} \
           -Pcode-coverage
       - name: SonarCloud Report
-        if: ${{ success() }}
+        if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push')}}
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
@@ -64,6 +71,4 @@ jobs:
           -Dsonar.projectKey=apache_incubator-iotdb \
           -Dsonar.host.url=https://sonarcloud.io \
           -Dsonar.login=${{ secrets.SONARCLOUD_TOKEN }} \
-          -Dsonar.pullrequest.key=$PR_NUMBER \
-          -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \
           -DskipTests -pl '!distribution' -am