feat: update joj3 format
This commit is contained in:
parent
98e4400e32
commit
b128625bce
|
@ -242,9 +242,8 @@ def joj3_scoreboard(
|
|||
submitter,
|
||||
os.path.join(repo_path, scoreboard_file_name),
|
||||
)
|
||||
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
tea.pot.git.add_commit_and_push(
|
||||
repo_name, [scoreboard_file_name], f"test: JOJ3-dev testing at {now}"
|
||||
repo_name, [scoreboard_file_name], f"joj3: update scoreboard by {submitter}"
|
||||
)
|
||||
|
||||
|
||||
|
@ -293,9 +292,10 @@ def joj3_failed_table(
|
|||
submitter_repo_link,
|
||||
os.path.join(repo_path, failed_table_file_name),
|
||||
)
|
||||
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
tea.pot.git.add_commit_and_push(
|
||||
repo_name, [failed_table_file_name], f"test: JOJ3-dev testing at {now}"
|
||||
repo_name,
|
||||
[failed_table_file_name],
|
||||
f"joj3: update failed table by {submitter_repo_name}",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -172,17 +172,23 @@ def generate_title_and_comment(
|
|||
stages: List[Dict[str, Any]] = json.load(json_file)
|
||||
|
||||
total_score = 0
|
||||
comment = f"[Gitea Actions]({action_link})\n"
|
||||
comment = f"Generated by [Gitea Actions]({action_link})\n"
|
||||
for stage in stages:
|
||||
comment += f"## {stage['name']}\n"
|
||||
single_case = len(stage["results"]) == 1
|
||||
for i, result in enumerate(stage["results"]):
|
||||
comment += f"### case {i}\n"
|
||||
comment += f"score: {result['score']}\n"
|
||||
comment += f"comment: {result['comment']}\n"
|
||||
comment += "### "
|
||||
if not single_case:
|
||||
comment += f"Case {i} - Score: {result['score']}"
|
||||
else:
|
||||
comment += f"Score: {result['score']}"
|
||||
comment += "\n"
|
||||
if result["comment"].strip() != "":
|
||||
comment += f"{result['comment']}\n"
|
||||
total_score += result["score"]
|
||||
comment += "\n"
|
||||
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
title = f"JOJ3 Result {now} - Total Score: {total_score}"
|
||||
title = f"JOJ3 Result {now} - Score: {total_score}"
|
||||
return title, comment
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user