From ba10a7bae2faf3556551a2a73640b34fcdcaca13 Mon Sep 17 00:00:00 2001 From: Jaime Silvela Date: Thu, 30 May 2024 18:28:52 +0200 Subject: [PATCH] fix: cap alerts view only for stand-alone Signed-off-by: Jaime Silvela --- summarize_test_results.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/summarize_test_results.py b/summarize_test_results.py index b544cc8..8e50634 100644 --- a/summarize_test_results.py +++ b/summarize_test_results.py @@ -523,12 +523,12 @@ def compute_systematic_failures_on_metric(summary, metric, embed=True): if not has_systematic_failure_in_metric: output += f"{metric_name(metric)} with systematic failures:\n\n" has_systematic_failure_in_metric = True - if counter < 2: - output += f"- {bucket}: ({failures} out of {runs} tests failed)\n" - counter += 1 - else: + if counter >= 2 and not embed: output += f"- ...and more. See full story in GH Test Summary\n" break + else: + output += f"- {bucket}: ({failures} out of {runs} tests failed)\n" + counter += 1 if has_systematic_failure_in_metric: # add a newline after at the end of the list of failures before starting the # next metric