diff --git a/Plogon/BuildProcessor.cs b/Plogon/BuildProcessor.cs index 7510369..4a146a3 100644 --- a/Plogon/BuildProcessor.cs +++ b/Plogon/BuildProcessor.cs @@ -874,7 +874,7 @@ private static void WriteNugetConfig(FileInfo output) /// The result of the build /// Generic build system errors /// Error during repo commit, all no further work should be done - public async Task ProcessTask(BuildTask task, bool commit, string? changelog, string? reviewer, ISet? otherTasks) + public async Task ProcessTask(BuildTask task, bool commit, string? changelog, string? reviewer, ISet otherTasks) { if (commit && string.IsNullOrWhiteSpace(reviewer)) throw new Exception("Reviewer must be set when committing"); diff --git a/Plogon/Program.cs b/Plogon/Program.cs index 749c8f8..60bfe02 100644 --- a/Plogon/Program.cs +++ b/Plogon/Program.cs @@ -521,6 +521,11 @@ string ReplaceDiscordEmotes(string text) var needsText = string.Empty; if (allNeeds.Count > 0) { + string Pluralize(int count, string singular) + { + return count == 1 ? singular : singular + "s"; + } + var numUnreviewed = 0; var numHidden = 0; var needsTable = MarkdownTableBuilder.Create("Type", "Name", "Version", "Reviewed by"); @@ -559,10 +564,10 @@ string ReplaceDiscordEmotes(string text) var hiddenText = string.Empty; if (numHidden > 0) - hiddenText = $"\n\n##### {numHidden} hidden needs (known safe NuGet packages).\n"; + hiddenText = $"\n\n##### {numHidden} hidden {Pluralize(numHidden, "need")} (known safe NuGet packages).\n"; needsText = - $"\n\n
\n{allNeeds.Count} Needs " + + $"\n\n
\n{allNeeds.Count} {Pluralize(allNeeds.Count, "Need")} " + (numUnreviewed > 0 ? $"(⚠️ {numUnreviewed} UNREVIEWED)" : "(✅ All reviewed)") + "\n\n" + needsTable.GetText() + hiddenText + "
\n\n";