huskies: merge 530_story_eliminate_filesystem_markdown_shadows_entirely_crdt_db_is_the_only_story_store
This commit is contained in:
@@ -113,15 +113,14 @@ fn move_item<'a>(
|
||||
Err(format!("Work item '{story_id}' not found in {locs}."))
|
||||
}
|
||||
|
||||
/// Move a work item (story, bug, or spike) to `work/2_current/`.
|
||||
/// Move a work item (story, bug, or spike) from `1_backlog` to `work/2_current/`.
|
||||
///
|
||||
/// The source stage is read from the CRDT — any existing stage is accepted.
|
||||
/// Only promotes from `1_backlog` — stories already in later stages (3_qa, 4_merge,
|
||||
/// etc.) are left untouched. This prevents coders from accidentally demoting a story
|
||||
/// that has already advanced past the coding stage.
|
||||
/// Idempotent: if already in `2_current/`, returns Ok. If not found, logs and returns Ok.
|
||||
pub fn move_story_to_current(project_root: &Path, story_id: &str) -> Result<(), String> {
|
||||
const ALL_STAGES: &[&str] = &[
|
||||
"1_backlog", "2_current", "3_qa", "4_merge", "5_done", "6_archived",
|
||||
];
|
||||
move_item(project_root, story_id, ALL_STAGES, "2_current", &[], true, &[]).map(|_| ())
|
||||
move_item(project_root, story_id, &["1_backlog"], "2_current", &[], true, &[]).map(|_| ())
|
||||
}
|
||||
|
||||
/// Check whether a feature branch `feature/story-{story_id}` exists and has
|
||||
|
||||
Reference in New Issue
Block a user