]> source.dussan.org Git - sonarqube.git/commitdiff
Disable analysis of external PRs
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 20 Jan 2016 13:17:01 +0000 (14:17 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 20 Jan 2016 13:40:00 +0000 (14:40 +0100)
travis.sh

index 88715b8ae10cc381683b738014847155c0515b3e..045a2adef2a239f8dfaadf3666df4b7f40be32e5 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -16,11 +16,10 @@ function strongEcho {
 case "$TARGET" in
 
 CI)
-  if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ -n "$GITHUB_TOKEN" ]; then
+  if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
     # For security reasons environment variables are not available on the pull requests
     # coming from outside repositories
     # http://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests
-    # That's why the analysis does not need to be executed if the variable GITHUB_TOKEN is not defined.
 
     strongEcho 'Build and analyze pull request'
     # this pull request must be built and analyzed (without upload of report)