diff --git a/joj3_config_generator/models/task.py b/joj3_config_generator/models/task.py index 13525ca..c58d57e 100644 --- a/joj3_config_generator/models/task.py +++ b/joj3_config_generator/models/task.py @@ -255,6 +255,10 @@ class Penalties(StrictBaseModel): factors: List[float] = [] +class Issue(StrictBaseModel): + skip: bool = False + + class Config(StrictBaseModel): root: Path = Field(Path("."), exclude=True) path: Path = Field(Path("task.toml"), exclude=True) @@ -264,6 +268,7 @@ class Config(StrictBaseModel): max_total_score: Optional[int] = Field( None, validation_alias=AliasChoices("max-total-score", "max_total_score") ) + issue: Issue = Issue() scoreboard: str = "scoreboard.csv" scoreboard_column_by_ref: bool = Field( False, diff --git a/joj3_config_generator/transformers/repo.py b/joj3_config_generator/transformers/repo.py index 409ebb4..777103b 100644 --- a/joj3_config_generator/transformers/repo.py +++ b/joj3_config_generator/transformers/repo.py @@ -42,6 +42,8 @@ def get_teapot_post_stage( ] if task_conf.scoreboard_column_by_ref: args.append("--scoreboard-column-by-ref") + if task_conf.issue.skip: + args.append("--skip-result-issue") if repo_conf.issue.label.exclusive: args.append("--issue-label-exclusive") if not repo_conf.issue.show_submitter: diff --git a/tests/convert/full/task.toml b/tests/convert/full/task.toml index 46cc5dc..2a33dd5 100644 --- a/tests/convert/full/task.toml +++ b/tests/convert/full/task.toml @@ -7,6 +7,9 @@ scoreboard = "auto" # whether to use gitea ref as scoreboard column, instead of the task name, default: false scoreboard-column-by-ref = true +# skip creating issue after job done, default: false +issue.skip = false + # 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