feat: support git ref as scoreboard column
All checks were successful
build / build (push) Successful in 1m37s
build / trigger-build-image (push) Successful in 8s

This commit is contained in:
张泊明518370910136 2025-07-27 03:36:43 -07:00
parent e2d2ced3ae
commit 44924d8c5f
GPG Key ID: D47306D7062CDA9D
4 changed files with 12 additions and 0 deletions

View File

@ -272,6 +272,12 @@ class Config(BaseModel):
None, validation_alias=AliasChoices("max-total-score", "max_total_score")
)
scoreboard: str = "scoreboard.csv"
scoreboard_column_by_ref: bool = Field(
False,
validation_alias=AliasChoices(
"scoreboard-column-by-ref", "scoreboard_column_by_ref"
),
)
time: SubmissionTime = SubmissionTime() # Valid time configuration
release: Release = Release() # Release configuration
groups: Groups = Groups()

View File

@ -45,6 +45,8 @@ def get_teapot_post_stage(
"--scoreboard-filename",
task_conf.scoreboard,
]
if task_conf.scoreboard_column_by_ref:
args.append("--scoreboard-column-by-ref")
if repo_conf.issue.label.exclusive:
args.append("--issue-label-exclusive")
if not repo_conf.issue.show_submitter:

View File

@ -446,6 +446,7 @@
"#795548",
"--scoreboard-filename",
"scoreboard-hw7.csv",
"--scoreboard-column-by-ref",
"--end-time",
"2024-12-30T23:59:59",
"--penalty-config",

View File

@ -4,6 +4,9 @@ name = "hw7 ex3" # task name, will be shown in the issue title
scoreboard = "auto"
# scoreboard = "scoreboard-42.csv" # use this if you want to specify a custom scoreboard
# whether to use gitea ref as scoreboard column, instead of the task name, default: false
scoreboard-column-by-ref = true
# task triggered not in this time period will not pass the health check
time.begin = 2024-12-29 23:59:59 # begin time, default: no start time, do not check
time.end = 2024-12-30 23:59:59 # end time, default: no end time, do not check