in commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/reports/MissingVcsRootsReport.java [72:99]
public void report(@NotNull HealthStatusScope scope, @NotNull HealthStatusItemConsumer consumer) {
for (SBuildType bt : scope.getBuildTypes()) {
List<VcsRootEntry> vcsRootEntries = bt.getVcsRootEntries();
Set<String> vcsRootIds = new HashSet<String>();
for (VcsRootEntry vcs: vcsRootEntries) {
VcsRoot vcsRoot = vcs.getVcsRoot();
if (vcsRoot instanceof SVcsRoot) {
vcsRootIds.add(vcsRoot.getExternalId());
}
}
Collection<SBuildFeatureDescriptor> features = bt.getBuildFeaturesOfType(CommitStatusPublisherFeature.TYPE);
for (SBuildFeatureDescriptor feature: features) {
if (bt.isEnabled(feature.getId())) {
Map<String, String> params = feature.getParameters();
String vcsRootId = params.get(Constants.VCS_ROOT_ID_PARAM);
if (StringUtil.isEmpty(vcsRootId)) {
if (bt.getVcsRoots().isEmpty()) {
reportIssue(consumer, bt, feature, vcsRootId);
}
} else {
if (!vcsRootIds.contains(vcsRootId)) {
reportIssue(consumer, bt, feature, vcsRootId);
}
}
}
}
}
}