huskies: merge 671_refactor_migrate_pipeline_state_consumers_from_string_comparisons_to_typed_pipelinestage_enum
This commit is contained in:
@@ -8,14 +8,15 @@ use crate::service::common::item_id::extract_item_number;
|
||||
|
||||
/// Human-readable display name for a pipeline stage directory.
|
||||
pub fn stage_display_name(stage: &str) -> &'static str {
|
||||
match stage {
|
||||
"1_backlog" => "Backlog",
|
||||
"2_current" => "Current",
|
||||
"3_qa" => "QA",
|
||||
"4_merge" => "Merge",
|
||||
"5_done" => "Done",
|
||||
"6_archived" => "Archived",
|
||||
_ => "Unknown",
|
||||
use crate::pipeline_state::Stage;
|
||||
match Stage::from_dir(stage) {
|
||||
Some(Stage::Backlog) => "Backlog",
|
||||
Some(Stage::Coding) => "Current",
|
||||
Some(Stage::Qa) => "QA",
|
||||
Some(Stage::Merge { .. }) => "Merge",
|
||||
Some(Stage::Done { .. }) => "Done",
|
||||
Some(Stage::Archived { .. }) => "Archived",
|
||||
None => "Unknown",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user