return tags;
}
private Release extractReleaseFor(TestTag releaseTag, TestOutcomes testOutcomes,
int level, List<Release> parents) {
Release release = new Release(releaseTag);
String reportName = reportNameProvider.forRelease(release);
release = release.withReport(reportName).withParents(parents);
List<Release> ancestors = ancestorsFor(release);
if (level < releaseTypes.size()) {
String childReleaseType = releaseTypes.get(level);
List<TestTag> childReleaseTags = testOutcomes.findMatchingTags()
.withType("version")
.withNameIn(matchingNames(childReleaseType))
.list();
List<Release> children = Lists.newArrayList();
for (TestTag tag : childReleaseTags) {
children.add(extractReleaseFor(tag, testOutcomes.withTag(tag), level + 1, ancestors));
}
release = release.withChildren(children);
}
return release;
}