From 331f4438d07c4149b084851d64d624f710331c1a Mon Sep 17 00:00:00 2001 From: C4tWithShell Date: Tue, 28 Nov 2023 13:09:54 +0300 Subject: [PATCH] Test id --- .../plugin/server/CommunityBranchSupportDelegate.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java b/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java index a71c76d..f09e624 100644 --- a/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java +++ b/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchSupportDelegate.java @@ -100,7 +100,7 @@ public ComponentDto createBranchComponent(DbSession dbSession, BranchSupport.Com dbClient.componentDao().insert(dbSession, componentDto, false); BranchDto branchDto = new BranchDto() - .setProjectUuid(mainComponentDto.uuid()) + .setProjectUuid(mainComponentBranchDto.getProjectUuid()) .setUuid(branchUuid); componentKey.getPullRequestKey().ifPresent(pullRequestKey -> branchDto.setBranchType(BranchType.PULL_REQUEST) .setExcludeFromPurge(false) @@ -110,7 +110,6 @@ public ComponentDto createBranchComponent(DbSession dbSession, BranchSupport.Com .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, branchDto.getProjectUuid()), branchName)) .setKey(branchName) .setIsMain(false)); - branchDto.setProjectUuid(mainComponentBranchDto.getProjectUuid()); dbClient.branchDao().insert(dbSession, branchDto); return componentDto;