.setAlmRepo(repository.getName())
.setAlmSlug(repository.getProject().getName())
.setProjectUuid(projectDto.getUuid())
- .setSummaryCommentEnabled(true)
.setMonorepo(monorepo);
dbClient.projectAlmSettingDao().insertOrUpdate(dbSession, projectAlmSettingDto, almSettingDto.getKey(), projectDto.getName(), projectDto.getKey());
}
ProjectAlmSettingDto projectAlmSettingDto = new ProjectAlmSettingDto()
.setAlmSettingUuid(almSettingDto.getUuid())
.setAlmRepo(repoSlug)
- .setAlmSlug(null)
.setProjectUuid(projectDto.getUuid())
- .setSummaryCommentEnabled(true)
.setMonorepo(monorepo);
dbClient.projectAlmSettingDao().insertOrUpdate(dbSession, projectAlmSettingDto, almSettingDto.getKey(), projectDto.getName(), projectDto.getKey());
}
defaultBranchName,
creationMethod);
ProjectDto projectDto = Optional.ofNullable(componentCreationData.projectDto()).orElseThrow();
- createProjectAlmSettingDto(dbSession, repository.getSlug(), projectDto, almSettingDto, monorepo);
+ createProjectAlmSettingDto(dbSession, repository, projectDto, almSettingDto, monorepo);
return componentCreationData;
}
return Optional.ofNullable(projectName).orElse(repository.getName());
}
- private void createProjectAlmSettingDto(DbSession dbSession, String repoSlug, ProjectDto projectDto, AlmSettingDto almSettingDto,
+ private void createProjectAlmSettingDto(DbSession dbSession, Repository repository, ProjectDto projectDto, AlmSettingDto almSettingDto,
Boolean isMonorepo) {
ProjectAlmSettingDto projectAlmSettingDto = new ProjectAlmSettingDto()
.setAlmSettingUuid(almSettingDto.getUuid())
- .setAlmRepo(repoSlug)
- .setAlmSlug(null)
+ .setAlmRepo(repository.getProject().getKey())
+ .setAlmSlug(repository.getSlug())
.setProjectUuid(projectDto.getUuid())
- .setSummaryCommentEnabled(true)
.setMonorepo(isMonorepo);
dbClient.projectAlmSettingDao().insertOrUpdate(dbSession, projectAlmSettingDto, almSettingDto.getKey(), projectDto.getName(), projectDto.getKey());
ProjectAlmSettingDto projectAlmSettingDto = new ProjectAlmSettingDto()
.setAlmSettingUuid(almSettingDto.getUuid())
.setAlmRepo(gitlabProjectId)
- .setAlmSlug(null)
.setProjectUuid(projectDto.getUuid())
- .setSummaryCommentEnabled(true)
.setMonorepo(monorepo);
dbClient.projectAlmSettingDao().insertOrUpdate(dbSession, projectAlmSettingDto, almSettingDto.getKey(), projectDto.getName(), projectDto.getKey());
}
ProjectAlmSettingDto createdProjectAlmSettingDto = projectAlmSettingCaptor.getValue();
assertThat(createdProjectAlmSettingDto.getAlmSettingUuid()).isEqualTo(ALM_SETTING_UUID);
- assertThat(createdProjectAlmSettingDto.getAlmRepo()).isEqualTo(DOP_REPOSITORY_ID);
+ assertThat(createdProjectAlmSettingDto.getAlmRepo()).isEqualTo(DOP_PROJECT_ID);
+ assertThat(createdProjectAlmSettingDto.getAlmSlug()).isEqualTo(DOP_REPOSITORY_ID);
assertThat(createdProjectAlmSettingDto.getProjectUuid()).isEqualTo(PROJECT_UUID);
assertThat(createdProjectAlmSettingDto.getMonorepo()).isTrue();
}
ProjectAlmSettingDto createdProjectAlmSettingDto = projectAlmSettingCaptor.getValue();
assertThat(createdProjectAlmSettingDto.getAlmSettingUuid()).isEqualTo(ALM_SETTING_UUID);
- assertThat(createdProjectAlmSettingDto.getAlmRepo()).isEqualTo(DOP_REPOSITORY_ID);
+ assertThat(createdProjectAlmSettingDto.getAlmRepo()).isEqualTo(DOP_PROJECT_ID);
+ assertThat(createdProjectAlmSettingDto.getAlmSlug()).isEqualTo(DOP_REPOSITORY_ID);
assertThat(createdProjectAlmSettingDto.getProjectUuid()).isEqualTo(PROJECT_UUID);
assertThat(createdProjectAlmSettingDto.getMonorepo()).isTrue();
}