Skip to content

Commit 6e6bf8c

Browse files
Merge pull request #4 from abpframework/discord-formatter-update
Remove unused Discord formatter constants & method
2 parents ee9025c + 54ce14c commit 6e6bf8c

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

src/Validator.Reporter/Formatting/DiscordReportFormatter.cs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,7 @@ public class DiscordReportFormatter
1515
private const int ColorRed = 0xCC0000;
1616

1717
// Discord limits
18-
private const int MaxEmbedDescriptionLength = 4096;
1918
private const int MaxFieldValueLength = 1024;
20-
private const int MaxTotalEmbedLength = 6000;
21-
22-
// Step status icons
23-
private static readonly Dictionary<StepExecutionStatus, string> StepIcons = new()
24-
{
25-
[StepExecutionStatus.Success] = "✅",
26-
[StepExecutionStatus.Failed] = "❌",
27-
[StepExecutionStatus.Skipped] = "⏭️",
28-
[StepExecutionStatus.Pending] = "⏳",
29-
[StepExecutionStatus.Running] = "🔄"
30-
};
3119

3220
/// <summary>
3321
/// Converts a ValidationReport to a DiscordMessage with rich embeds.
@@ -152,31 +140,6 @@ public List<DiscordMessage> FormatMessages(ValidationReport report)
152140
return messages;
153141
}
154142

155-
private static List<string> BuildStepsChunks(ValidationReport report)
156-
{
157-
if (report.Result.StepResults.Count == 0)
158-
{
159-
return [];
160-
}
161-
162-
var lines = new List<string>();
163-
164-
foreach (var step in report.Result.StepResults)
165-
{
166-
var icon = StepIcons.TryGetValue(step.Status, out var i) ? i : "•";
167-
var line = $"{icon} Step {step.StepId}: {step.StepType}";
168-
169-
if (step.Status == StepExecutionStatus.Failed && !string.IsNullOrWhiteSpace(step.ErrorMessage))
170-
{
171-
line += $" — `{step.ErrorMessage.Trim()}`";
172-
}
173-
174-
lines.Add(line);
175-
}
176-
177-
return BuildFieldChunks(lines);
178-
}
179-
180143
private static List<string> BuildDiagnosticsChunks(ValidationReport report)
181144
{
182145
if (report.FailureDiagnostics?.Count is not > 0)

0 commit comments

Comments
 (0)