From 9fbfb15f22802a9bc64e06d7e1ed997208240e2a Mon Sep 17 00:00:00 2001 From: Martin Wittlinger Date: Sat, 29 Oct 2022 17:36:32 +0200 Subject: [PATCH] fix: improve periodic summary --- .../io/github/martinwitt/laughing_train/ChangelogPrinter.java | 1 + .../martinwitt/laughing_train/summary/PeriodicSummary.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/ChangelogPrinter.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/ChangelogPrinter.java index 2a9ab7687..73f181918 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/ChangelogPrinter.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/ChangelogPrinter.java @@ -52,6 +52,7 @@ private String toYaml(AnalyzerResult analyzerResult) { public String printRepairedIssues(Collection changes) { StringBuilder sb = new StringBuilder(); sb.append("# Repairing Code Style Issues\n"); + sb.append(""); changes.stream().map(Change::getBadSmell).distinct().forEach(v -> sb.append( "## " + v.getName().asText() + "\n") .append(v.getDescription().asMarkdown()) diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/summary/PeriodicSummary.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/summary/PeriodicSummary.java index bb306482c..ab02b1bbd 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/summary/PeriodicSummary.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/summary/PeriodicSummary.java @@ -121,6 +121,9 @@ private String createSummaryBody(Map> prsByGHRepo) { } private String findRuleID(String body) { + if (body.contains("laughing-train-refactor")) { + return "Multiple rules"; + } String result = Strings.nullToEmpty(StringUtils.substringBetween(body, "ruleID:")) .replace("\n", "") .replace("\"", "")