From 916e83f875d75482c130055774e2d92b09d25860 Mon Sep 17 00:00:00 2001 From: kyubisation Date: Tue, 16 Jul 2019 10:17:12 +0200 Subject: [PATCH] build: configure branch for sonar (#108) --- scripts/sonar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/sonar.js b/scripts/sonar.js index 04474892a8..f0444873ee 100644 --- a/scripts/sonar.js +++ b/scripts/sonar.js @@ -5,7 +5,10 @@ if (process.env.SONAR_TOKEN) { sonarqubeScanner( { serverUrl: 'https://sonarcloud.io', - token: process.env.SONAR_TOKEN + token: process.env.SONAR_TOKEN, + options: { + 'sonar.branch': process.env.TRAVIS_PULL_REQUEST_BRANCH || process.env.TRAVIS_BRANCH + } }, resolve )