Automation
This commit is contained in:
parent
b12a673078
commit
e45a8063e3
6 changed files with 1022 additions and 4 deletions
57
src/enums.rs
57
src/enums.rs
|
|
@ -8,6 +8,9 @@ pub enum ToDoStatus {
|
|||
Completed,
|
||||
Blocked,
|
||||
ReadyForAgent,
|
||||
Delegated,
|
||||
Failed,
|
||||
PendingApproval,
|
||||
}
|
||||
|
||||
impl Default for ToDoStatus {
|
||||
|
|
@ -24,6 +27,9 @@ impl fmt::Display for ToDoStatus {
|
|||
ToDoStatus::Completed => write!(f, "completed"),
|
||||
ToDoStatus::Blocked => write!(f, "blocked"),
|
||||
ToDoStatus::ReadyForAgent => write!(f, "ready_for_agent"),
|
||||
ToDoStatus::Delegated => write!(f, "delegated"),
|
||||
ToDoStatus::Failed => write!(f, "failed"),
|
||||
ToDoStatus::PendingApproval => write!(f, "pending_approval"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +43,9 @@ impl std::str::FromStr for ToDoStatus {
|
|||
"completed" => Ok(ToDoStatus::Completed),
|
||||
"blocked" => Ok(ToDoStatus::Blocked),
|
||||
"ready_for_agent" => Ok(ToDoStatus::ReadyForAgent),
|
||||
"delegated" => Ok(ToDoStatus::Delegated),
|
||||
"failed" => Ok(ToDoStatus::Failed),
|
||||
"pending_approval" => Ok(ToDoStatus::PendingApproval),
|
||||
_ => Err(format!("unknown status: {}", s)),
|
||||
}
|
||||
}
|
||||
|
|
@ -191,3 +200,51 @@ pub enum TaskResultType {
|
|||
Error,
|
||||
Split,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ToDoSource {
|
||||
User,
|
||||
Planner,
|
||||
Automation,
|
||||
Delegation,
|
||||
}
|
||||
|
||||
impl Default for ToDoSource {
|
||||
fn default() -> Self {
|
||||
ToDoSource::User
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for ToDoSource {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
ToDoSource::User => write!(f, "user"),
|
||||
ToDoSource::Planner => write!(f, "planner"),
|
||||
ToDoSource::Automation => write!(f, "automation"),
|
||||
ToDoSource::Delegation => write!(f, "delegation"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum TestStrategy {
|
||||
Unit,
|
||||
Integration,
|
||||
E2e,
|
||||
Property,
|
||||
Manual,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for TestStrategy {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
TestStrategy::Unit => write!(f, "unit"),
|
||||
TestStrategy::Integration => write!(f, "integration"),
|
||||
TestStrategy::E2e => write!(f, "e2e"),
|
||||
TestStrategy::Property => write!(f, "property"),
|
||||
TestStrategy::Manual => write!(f, "manual"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue