]> source.dussan.org Git - sonarqube.git/commitdiff
Fix analysis of pull requests on Travis
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 20 Oct 2017 07:44:07 +0000 (09:44 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 20 Oct 2017 07:44:07 +0000 (09:44 +0200)
travis.sh

index 7d80c1242bc190217c554ffa9e761369443cd192..31e0c5663deb223ddf03e8ef932c23fd52cea375 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -194,7 +194,8 @@ BUILD)
         -Dsonar.branch.target=$TRAVIS_BRANCH \
         -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
         -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
-        -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
+        -Dsonar.analysis.sha1=$TRAVIS_PULL_REQUEST_SHA \
+        -Dsonar.analysis.prNumber=$TRAVIS_PULL_REQUEST \
         -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
   else
     echo 'Build feature branch or external pull request'