Skip to content

Commit

Permalink
chore(TCOMP-2755): prevent milestones in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
undx committed Jun 26, 2024
1 parent 6e58767 commit 734f554
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ public class Generator {

private static final Pattern SNAPSHOT = Pattern.compile("(-SNAPSHOT|M\\d+-SNAPSHOT)");

private static final Pattern MILESTONE = Pattern.compile("(M\\d+|M\\d+-SNAPSHOT)$");

public static void main(final String[] args) {
if (Boolean.parseBoolean(args[7]) || Boolean.getBoolean(System.getenv("TRAVIS"))) {
log.info("Skipping doc generation as requested");
Expand Down Expand Up @@ -605,7 +607,9 @@ public Stream<JiraIssues> apply(final String jql, final JiraIssues issues) {
.append('\n'),
StringBuilder::append)));

final String changelog = changelogPerVersion.entrySet().stream().sorted((v1, v2) -> {
final String changelog = changelogPerVersion.entrySet().stream()
.filter(v -> !MILESTONE.matcher(v.getKey()).find())
.sorted((v1, v2) -> {
if (v1.equals(v2)) {
return 0;
}
Expand Down

0 comments on commit 734f554

Please sign in to comment.