chore: check output format
All checks were successful
build / trigger-build-image (push) Successful in 11s

This commit is contained in:
张泊明518370910136 2025-06-17 16:09:15 -04:00
parent bbc415b33d
commit 0f39e660d0
GPG Key ID: CA088E6D9284F870

View File

@ -290,14 +290,14 @@ class Teapot:
if (valid_after and now < valid_after) or (valid_before and now > valid_before): if (valid_after and now < valid_after) or (valid_before and now > valid_before):
return ( return (
"### Submission Time Check Failed:\n" "### Submission Time Check Failed:\n"
f"Current time {now} is not in the valid range.\n" f"Current time {now} is not in the valid range "
f"After: {valid_after}, Before: {valid_before}\n", f"[{valid_after}, {valid_before}].\n",
True, True,
) )
return ( return (
"### Submission Time Check Passed:\n" "### Submission Time Check Passed:\n"
f"Current time {now} is in the valid range.\n" f"Current time {now} is in the valid range "
f"After: {valid_after}, Before: {valid_before}\n", f"[{valid_after}, {valid_before}].\n",
False, False,
) )
@ -383,13 +383,15 @@ class Teapot:
comment += f"keyword `{name}` " comment += f"keyword `{name}` "
use_group = name.lower() in env.joj3_groups.lower() use_group = name.lower() in env.joj3_groups.lower()
comment += ( comment += (
f"in last {time_period} hour(s): " f"In last {time_period} hour(s): "
f"submit count {submit_count}, " f"submit count {submit_count}, "
f"max count {max_count}" f"max count {max_count}"
) )
if use_group and submit_count + 1 > max_count: if use_group and submit_count + 1 > max_count:
failed = True failed = True
comment += ", exceeded" comment += ", exceeded."
else:
comment += "."
comment += "\n" comment += "\n"
if failed: if failed:
title = "### Submission Count Check Failed:" title = "### Submission Count Check Failed:"