From 8927129fada7b7bfedad25324468cdfc8a471ac8 Mon Sep 17 00:00:00 2001 From: Miha Zupan Date: Thu, 5 Sep 2024 07:49:02 +0200 Subject: [PATCH] Emit number of patterns with diffs as a regular log --- Runner/Jobs/RegexDiffJob.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Runner/Jobs/RegexDiffJob.cs b/Runner/Jobs/RegexDiffJob.cs index 90ac6d5..5d87930 100644 --- a/Runner/Jobs/RegexDiffJob.cs +++ b/Runner/Jobs/RegexDiffJob.cs @@ -449,17 +449,15 @@ private async Task UploadSourceGeneratorResultsAsync(RegexEntry[] entries) int patternsWithDiffs = entries.Count(e => e.ShortDiff is not null); + // MihuBot looks for this exact string in logs + await LogAsync($"NOTE: {patternsWithDiffs} out of {entries.Length} patterns have generated source code changes."); + if (patternsWithDiffs > 0) { string shortExample = GenerateExamplesMarkdown(entries, GitHubHelpers.CommentLengthLimit / 2, maxEntries: 10); string longExample = GenerateExamplesMarkdown(entries, GitHubHelpers.GistLengthLimit, maxEntries: int.MaxValue); - await UploadTextArtifactAsync("ShortExampleDiffs.md", - $""" - {patternsWithDiffs} out of {entries.Length} patterns have generated source code changes. - - {shortExample} - """); + await UploadTextArtifactAsync("ShortExampleDiffs.md", shortExample); if (shortExample != longExample) {