diff options
Diffstat (limited to 'sonar-scanner-engine/src/main')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java index 59d8e6b8846..c81845047b1 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java @@ -258,16 +258,11 @@ public class ProjectScanContainer extends ComponentContainer { ScannerProperties.BRANCH_NAME, ScannerProperties.BRANCHES_DOC_LINK); } - String branchName = props.property(ScannerProperties.BRANCH_NAME); - if (branchName != null) { - BranchConfiguration branchConfig = getComponentByType(BranchConfiguration.class); - LOG.info("Branch name: {}, type: {}", branchName, branchTypeToDisplayName(branchConfig.branchType())); - } - - String pullRequestBranch = props.property(ScannerProperties.PULL_REQUEST_BRANCH); - if (pullRequestBranch != null) { - String pullRequestBase = props.property(ScannerProperties.PULL_REQUEST_BASE); - LOG.info("Pull request into {}: {}", pullRequestBaseToDisplayName(pullRequestBase), pullRequestBranch); + BranchConfiguration branchConfig = getComponentByType(BranchConfiguration.class); + if (branchConfig.branchType() == BranchType.PULL_REQUEST) { + LOG.info("Pull request {} for merge into {} from {}", branchConfig.pullRequestKey(), pullRequestBaseToDisplayName(branchConfig.branchBase()), branchConfig.branchName()); + } else if (branchConfig.branchName() != null) { + LOG.info("Branch name: {}, type: {}", branchConfig.branchName(), branchTypeToDisplayName(branchConfig.branchType())); } LOG.debug("Start recursive analysis of project modules"); |