Skip to content

Commit

Permalink
fix: improve periodic summary
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Oct 29, 2022
1 parent 7fa964f commit 9fbfb15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ private String toYaml(AnalyzerResult analyzerResult) {
public String printRepairedIssues(Collection<? extends Change> changes) {
StringBuilder sb = new StringBuilder();
sb.append("# Repairing Code Style Issues\n");
sb.append("<!-- laughing-train-refactor -->");
changes.stream().map(Change::getBadSmell).distinct().forEach(v -> sb.append(
"## " + v.getName().asText() + "\n")
.append(v.getDescription().asMarkdown())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ private String createSummaryBody(Map<String, List<PullRequest>> 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("\"", "")
Expand Down

0 comments on commit 9fbfb15

Please sign in to comment.