From a0982f7eebe55b5981a3d679e25def4e15a7ec57 Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Sat, 1 Feb 2025 04:50:50 -0500 Subject: [PATCH] fix: joj3-check-env var name --- joint_teapot/app.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/joint_teapot/app.py b/joint_teapot/app.py index 0378d3f..2db2c5d 100644 --- a/joint_teapot/app.py +++ b/joint_teapot/app.py @@ -875,8 +875,7 @@ def joj3_check_env( submit_count = 0 commits = repo.iter_commits(paths=scoreboard_file_name, since=since_git_format) for commit in commits: - comment = commit.message.strip() - lines = comment.splitlines() + lines = commit.message.strip().splitlines() pattern = ( r"joj3: update scoreboard for (?P.+?) " r"by @(?P.+) in " @@ -907,12 +906,12 @@ def joj3_check_env( use_group = False if name: comment += f"keyword `{name}` " + for group in groups or "": + if group.lower() == name.lower(): + use_group = True + break else: use_group = True - for group in groups or "": - if group.lower() == name.lower(): - use_group = True - break comment += ( f"in last {time_period} hour(s): " f"submit count {submit_count}, "