From 02a09d32fb0f504d34602b82bfc08d516ca48bcb Mon Sep 17 00:00:00 2001
From: mQzLjP <91550006+mQzLjP@users.noreply.github.com>
Date: Fri, 11 Oct 2024 08:36:08 +0800
Subject: [PATCH] fix: completely remove content on empty stage (#45)

Co-authored-by: BoYanZh <boyanzh233@gmail.com>
---
 joint_teapot/utils/joj3.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py
index 79d7abe..ea9b087 100644
--- a/joint_teapot/utils/joj3.py
+++ b/joint_teapot/utils/joj3.py
@@ -196,12 +196,12 @@ def generate_title_and_comment(
         + "[Joint-Teapot](https://github.com/BoYanZh/Joint-Teapot) with ❤️.\n"
     )
     for stage in stages:
-        comment += f"## {stage['name']}\n"
         if all(
             result["score"] == 0 and result["comment"].strip() == ""
             for result in stage["results"]
         ):
             continue
+        comment += f"## {stage['name']}\n"
         force_quit = stage["force_quit"]
         if force_quit:
             comment += " - Failed"