refactor: rewrite in rust
This commit is contained in:
parent
20a3e8b437
commit
ed493cff29
72 changed files with 5684 additions and 3688 deletions
46
src/localize/preconfigured.rs
Normal file
46
src/localize/preconfigured.rs
Normal 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")]),
|
||||
)
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue