fix: completely remove content on empty stage (#45)

Co-authored-by: BoYanZh <boyanzh233@gmail.com>
This commit is contained in:
mQzLjP 2024-10-11 08:36:08 +08:00 committed by GitHub
parent 342c145d20
commit 02a09d32fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,12 +196,12 @@ def generate_title_and_comment(
+ "[Joint-Teapot](https://github.com/BoYanZh/Joint-Teapot) with ❤️.\n" + "[Joint-Teapot](https://github.com/BoYanZh/Joint-Teapot) with ❤️.\n"
) )
for stage in stages: for stage in stages:
comment += f"## {stage['name']}\n"
if all( if all(
result["score"] == 0 and result["comment"].strip() == "" result["score"] == 0 and result["comment"].strip() == ""
for result in stage["results"] for result in stage["results"]
): ):
continue continue
comment += f"## {stage['name']}\n"
force_quit = stage["force_quit"] force_quit = stage["force_quit"]
if force_quit: if force_quit:
comment += " - Failed" comment += " - Failed"