Skip to content

Commit

Permalink
ci: add checking if env is null to fix sonarqube issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdelmundo authored Mar 17, 2022
1 parent d76ed73 commit cf09513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sonarqube {
property 'sonar.login', System.getenv("SONARQUBE_TOKEN")
property 'sonar.projectKey', System.getenv("SONARQUBE_PROJ_KEY")
property 'sonar.projectVersion', scmVersion.version
if (branch == baseBranch || branch == "") {
if (branch == baseBranch || branch == "" || !branch) {
property 'sonar.branch.name', baseBranch
} else {
property 'sonar.pullrequest.key', System.getenv("BITRISE_PULL_REQUEST").findAll(/\d+/)*.toInteger().last()
Expand Down

0 comments on commit cf09513

Please sign in to comment.