Add completed project count to summary title

This commit is contained in:
Zanie
2023-10-26 16:26:01 -05:00
parent 9cdf864043
commit 85de1e97e2
2 changed files with 16 additions and 7 deletions

View File

@@ -72,10 +72,14 @@ def markdown_check_result(result: Result) -> str:
return "\u2705 ecosystem check detected no linter changes."
# Summarize the total changes
s = "s" if error_count != 1 else ""
changes = f"(+{total_added} -{total_removed} violations, +{total_added_fixes} -{total_removed_fixes} fixes, {error_count} error{s})"
changes = f"+{total_added} -{total_removed} violations, +{total_added_fixes} -{total_removed_fixes} fixes in {len(result.completed)} projects"
if error_count:
s = "s" if error_count != 1 else ""
changes += f"; {error_count} project error{s}"
lines.append(f"\u2139\ufe0f ecosystem check **detected linter changes**. {changes}")
lines.append(
f"\u2139\ufe0f ecosystem check **detected linter changes**. ({changes})"
)
lines.append("")
# Limit the number of items displayed per rule to between 5 and 200

View File

@@ -44,10 +44,15 @@ def markdown_format_result(result: Result) -> str:
return "\u2705 ecosystem check detected no format changes."
# Summarize the total changes
es = "s" if error_count != 1 else ""
fs = "s" if total_files_modified != 1 else ""
changes = f"(+{total_lines_added}, -{total_lines_removed} lines in {total_files_modified} file{fs}, {error_count} error{es})"
lines.append(f"\u2139\ufe0f ecosystem check **detected format changes**. {changes}")
s = "s" if total_files_modified != 1 else ""
changes = f"+{total_lines_added} -{total_lines_removed} lines in {total_files_modified} file{s} in {len(result.completed)} projects"
if error_count:
s = "s" if error_count != 1 else ""
changes += f"; {error_count} project error{s}"
lines.append(
f"\u2139\ufe0f ecosystem check **detected format changes**. ({changes})"
)
lines.append("")
# Then per-project changes