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/05/31 15:53:59 UTC

[iotdb] branch enablesonarv2 created (now 990aac7)

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

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


      at 990aac7  Enable sonar-coveralls for pr from fork repos

This branch includes the following new commits:

     new 990aac7  Enable sonar-coveralls for pr from fork repos

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: Enable sonar-coveralls for pr from fork repos

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 990aac746b3856bfa9900a41a25f19cf862d5ff3
Author: HTHou <hh...@outlook.com>
AuthorDate: Mon May 31 23:53:13 2021 +0800

    Enable sonar-coveralls for pr from fork repos
---
 .github/workflows/sonar-coveralls.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/sonar-coveralls.yml b/.github/workflows/sonar-coveralls.yml
index 7f1dcdc..7b6f1aa 100644
--- a/.github/workflows/sonar-coveralls.yml
+++ b/.github/workflows/sonar-coveralls.yml
@@ -10,7 +10,7 @@ on:
       - "rel/*"
     paths-ignore:
       - "docs/**"
-  pull_request:
+  pull_request_target:
     branches:
       - master
       - "rel/*"
@@ -43,7 +43,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
       - name: Code Coverage (Coveralls)
-        if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push') }}
+        if: ${{ success() }}
         run: |
           mvn -B post-integration-test -Pcode-coverage -pl code-coverage
           mvn -B coveralls:report \
@@ -53,7 +53,7 @@ jobs:
           -DrepoToken=${{ secrets.COVERALL_TOKEN }} \
           -Pcode-coverage
       - name: SonarCloud Report
-        if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push') }}
+        if: ${{ success() }}
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
@@ -63,4 +63,6 @@ jobs:
           -Dsonar.projectKey=apache_incubator-iotdb \
           -Dsonar.host.url=https://sonarcloud.io \
           -Dsonar.login=${{ secrets.SONARCLOUD_TOKEN }} \
+          -Dsonar.pullrequest.branch=$BRANCH_NAME \
+          -Dsonar.pullrequest.key=$PR_NUMBER \
           -DskipTests -pl '!distribution' -am