use of net.nemerosa.ontrack.model.structure.BuildView in project ontrack by nemerosa.
the class SCMUtilsServiceImpl method getBranchInfo.
@Override
public SCMIssueCommitBranchInfo getBranchInfo(Optional<Build> buildAfterCommit, SCMIssueCommitBranchInfo branchInfo) {
SCMIssueCommitBranchInfo info = branchInfo;
if (buildAfterCommit.isPresent()) {
Build build = buildAfterCommit.get();
// Gets the build view
BuildView buildView = structureService.getBuildView(build, true);
// Adds it to the list
info = info.withBuildView(buildView);
// Collects the promotions for the branch
info = info.withBranchStatusView(structureService.getEarliestPromotionsAfterBuild(build));
}
// OK
return info;
}
Aggregations