in generator/src/main/groovy/generator/ChangelogParser.groovy [80:98]
private static List<Changelog> createAggregates(final List<Changelog> changelogs, final Set<String> releasedVersions) {
def allMajor = changelogs.groupBy {
def v = it.groovyVersion
v.contains('-')?v-v.substring(v.indexOf('-')):v
}.findAll { ver, logs -> ver in releasedVersions || ver in INFO.keySet() } // add some unreleased versions to get aggregate changelog
allMajor.collect { k,v ->
def changelog = changelogs.find { it.groovyVersion == k }
if (!changelog) {
println "Not found: $k"
// it's useful to have an aggregate when we haven't done a '.0' release, use '-unreleased' to track
changelog = new Changelog(groovyVersion: k + '-unreleased', issues:[])
changelogs << changelog
}
v.each {
changelog.issues = [*changelog.issues, *it.issues].unique().sort { it.id }
}
}
changelogs
}