feat: leave comment on force quit

This commit is contained in:
张泊明518370910136 2024-10-01 04:56:59 -04:00
parent 131fd5af0b
commit bc6d85811d
GPG Key ID: CA088E6D9284F870

View File

@ -189,9 +189,9 @@ def generate_title_and_comment(
comment = f"Generated by [Gitea Actions #{run_number}]({action_link})\n"
for stage in stages:
comment += f"## {stage['name']}"
if stage["force_quit"] == True:
force_quit = stage["force_quit"]
if force_quit:
comment += " - Failed"
continue
single_case = len(stage["results"]) == 1
if single_case:
comment += f" - Score: {stage['results'][0]['score']}"