feat: support git ref as scoreboard column
All checks were successful
build / trigger-build-image (push) Successful in 10s
All checks were successful
build / trigger-build-image (push) Successful in 10s
This commit is contained in:
parent
2d7aba5ce0
commit
aa9a69eaf1
|
@ -295,6 +295,10 @@ def joj3_all_env(
|
||||||
False,
|
False,
|
||||||
help="skip creating failed table on gitea",
|
help="skip creating failed table on gitea",
|
||||||
),
|
),
|
||||||
|
scoreboard_column_by_ref: bool = Option(
|
||||||
|
False,
|
||||||
|
help="use git ref as scoreboard column name",
|
||||||
|
),
|
||||||
submitter_in_issue_title: bool = Option(
|
submitter_in_issue_title: bool = Option(
|
||||||
True,
|
True,
|
||||||
help="whether to include submitter in issue title",
|
help="whether to include submitter in issue title",
|
||||||
|
@ -403,11 +407,14 @@ def joj3_all_env(
|
||||||
raise Exit(code=1)
|
raise Exit(code=1)
|
||||||
repo.git.reset("--hard", "origin/grading")
|
repo.git.reset("--hard", "origin/grading")
|
||||||
if not skip_scoreboard:
|
if not skip_scoreboard:
|
||||||
|
exercise_name = env.joj3_conf_name
|
||||||
|
if scoreboard_column_by_ref:
|
||||||
|
exercise_name = env.github_ref
|
||||||
joj3.generate_scoreboard(
|
joj3.generate_scoreboard(
|
||||||
env.joj3_output_path,
|
env.joj3_output_path,
|
||||||
env.github_actor,
|
env.github_actor,
|
||||||
os.path.join(repo_path, scoreboard_filename),
|
os.path.join(repo_path, scoreboard_filename),
|
||||||
env.joj3_conf_name,
|
exercise_name,
|
||||||
submitter_repo_name,
|
submitter_repo_name,
|
||||||
)
|
)
|
||||||
tea.pot.git.add_commit(
|
tea.pot.git.add_commit(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user