refactor: rewrite in rust
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m38s
Continuous Integration / Build Package (push) Successful in 1m54s

This commit is contained in:
Konstantin Fickel 2026-03-29 18:19:15 +02:00
parent 20a3e8b437
commit ed493cff29
Signed by: kfickel
GPG key ID: A793722F9933C1A5
72 changed files with 5684 additions and 3688 deletions

View file

@ -0,0 +1,46 @@
use once_cell::sync::Lazy;
use crate::models::{Dimension, Marker, MarkerPlacement, RepositoryConfiguration};
/// Pre-configured repository configuration for task management.
#[allow(non_upper_case_globals)]
pub static TaskConfiguration: Lazy<RepositoryConfiguration> = Lazy::new(|| {
RepositoryConfiguration::new()
.with_dimension(
"task",
Dimension::new("Task")
.with_comment(
"If placed, the given shard is a task. The placement determines the state.",
)
.with_propagate(false),
)
.with_dimension(
"project",
Dimension::new("Project")
.with_comment("Project the task is attached to")
.with_propagate(true),
)
.with_marker(
"Task",
Marker::new("Task").with_placements(vec![
MarkerPlacement::new("task").with_value("open"),
MarkerPlacement::new("task")
.with_if_with(vec!["Done"])
.with_value("done"),
MarkerPlacement::new("task")
.with_if_with(vec!["Waiting"])
.with_value("waiting"),
MarkerPlacement::new("task")
.with_if_with(vec!["Cancelled"])
.with_value("cancelled"),
MarkerPlacement::new("task")
.with_if_with(vec!["NotDone"])
.with_value("cancelled"),
]),
)
.with_marker(
"WaitingFor",
Marker::new("Task")
.with_placements(vec![MarkerPlacement::new("task").with_value("waiting")]),
)
});