From 2ac1ab4eadc428ddb7c5919c1aa68875abdef7eb Mon Sep 17 00:00:00 2001
From: BoYanZh <boyanzh233@gmail.com>
Date: Fri, 11 Oct 2024 11:53:39 -0400
Subject: [PATCH] feat: show stage score

---
 joint_teapot/utils/joj3.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py
index 64e9941..1576a4a 100644
--- a/joint_teapot/utils/joj3.py
+++ b/joint_teapot/utils/joj3.py
@@ -82,9 +82,9 @@ def generate_scoreboard(
     submitter_row[columns.index("total")] = str(total)
 
     now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
-    submitter_row[
-        columns.index("last_edit")
-    ] = now  # FIXME: Delete this in formal version
+    submitter_row[columns.index("last_edit")] = (
+        now  # FIXME: Delete this in formal version
+    )
 
     # Sort data by total, from low to high
     data.sort(key=lambda x: int(x[columns.index("total")]))
@@ -201,7 +201,8 @@ def generate_title_and_comment(
             for result in stage["results"]
         ):
             continue
-        comment += f"## {stage['name']}"
+        stage_score = sum(result["score"] for result in stage["results"])
+        comment += f"## {stage['name']} - Score: {stage_score}"
         force_quit = stage["force_quit"]
         if force_quit:
             comment += " - Fatal Error"