huskies: merge 671_refactor_migrate_pipeline_state_consumers_from_string_comparisons_to_typed_pipelinestage_enum
This commit is contained in:
@@ -106,16 +106,16 @@ pub fn is_config_file(path: &Path, git_root: &Path) -> bool {
|
||||
/// Used by the CRDT-to-watcher bridge (in `main.rs`) to derive the action and
|
||||
/// commit message for `WatcherEvent::WorkItem` events.
|
||||
pub fn stage_metadata(stage: &str, item_id: &str) -> Option<(&'static str, String)> {
|
||||
let (action, prefix) = match stage {
|
||||
"1_backlog" => ("create", format!("huskies: create {item_id}")),
|
||||
"2_current" => ("start", format!("huskies: start {item_id}")),
|
||||
"3_qa" => ("qa", format!("huskies: queue {item_id} for QA")),
|
||||
"4_merge" => ("merge", format!("huskies: queue {item_id} for merge")),
|
||||
"5_done" => ("done", format!("huskies: done {item_id}")),
|
||||
"6_archived" => ("accept", format!("huskies: accept {item_id}")),
|
||||
_ => return None,
|
||||
use crate::pipeline_state::Stage;
|
||||
let (action, msg) = match Stage::from_dir(stage)? {
|
||||
Stage::Backlog => ("create", format!("huskies: create {item_id}")),
|
||||
Stage::Coding => ("start", format!("huskies: start {item_id}")),
|
||||
Stage::Qa => ("qa", format!("huskies: queue {item_id} for QA")),
|
||||
Stage::Merge { .. } => ("merge", format!("huskies: queue {item_id} for merge")),
|
||||
Stage::Done { .. } => ("done", format!("huskies: done {item_id}")),
|
||||
Stage::Archived { .. } => ("accept", format!("huskies: accept {item_id}")),
|
||||
};
|
||||
Some((action, prefix))
|
||||
Some((action, msg))
|
||||
}
|
||||
|
||||
/// Return the pipeline stage name for a path if it is a `.md` file living
|
||||
|
||||
Reference in New Issue
Block a user