streamd/src/localize/preconfigured.rs
Konstantin Fickel 4116a7042d
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 2m32s
Continuous Integration / Build Package (push) Successful in 3m0s
refactor: rewrite in rust
2026-03-29 18:23:21 +02:00

46 lines
1.7 KiB
Rust

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")]),
)
});