huskies: merge 865
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//! Passing no dependency numbers clears the field entirely.
|
||||
|
||||
use super::CommandContext;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
|
||||
/// Handle the `depends` command.
|
||||
///
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//! advancement and auto-assign until `unfreeze <number>` restores the prior stage.
|
||||
|
||||
use super::CommandContext;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::path::Path;
|
||||
|
||||
/// Handle the `freeze` command.
|
||||
|
||||
@@ -57,7 +57,7 @@ pub(super) fn handle_move(ctx: &CommandContext) -> Option<String> {
|
||||
};
|
||||
|
||||
let found_name = content
|
||||
.and_then(|c| crate::io::story_metadata::parse_front_matter(&c).ok())
|
||||
.and_then(|c| crate::db::yaml_legacy::parse_front_matter(&c).ok())
|
||||
.and_then(|m| m.name);
|
||||
|
||||
let display_name = found_name.as_deref().unwrap_or(&story_id);
|
||||
|
||||
@@ -109,7 +109,7 @@ fn find_story_merge_commit(root: &std::path::Path, num_str: &str) -> Option<Stri
|
||||
fn find_story_name(root: &std::path::Path, num_str: &str) -> Option<String> {
|
||||
let (_, _, _, content) = crate::chat::lookup::find_story_by_number(root, num_str)?;
|
||||
let content = content?;
|
||||
crate::io::story_metadata::parse_front_matter(&content)
|
||||
crate::db::yaml_legacy::parse_front_matter(&content)
|
||||
.ok()
|
||||
.and_then(|m| m.name)
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ pub(crate) fn build_status_from_items(
|
||||
.filter(|i| matches!(i.stage, Stage::Merge { .. }))
|
||||
.filter_map(|i| {
|
||||
let content = crate::db::read_content(&i.story_id.0)?;
|
||||
let meta = crate::io::story_metadata::parse_front_matter(&content).ok()?;
|
||||
let meta = crate::db::yaml_legacy::parse_front_matter(&content).ok()?;
|
||||
let mf = meta.merge_failure?;
|
||||
Some((i.story_id.0.clone(), mf))
|
||||
})
|
||||
|
||||
@@ -69,7 +69,7 @@ fn build_triage_dump(
|
||||
None => return format!("Story {num_str}: content not found in content store."),
|
||||
};
|
||||
|
||||
let meta = crate::io::story_metadata::parse_front_matter(&contents).ok();
|
||||
let meta = crate::db::yaml_legacy::parse_front_matter(&contents).ok();
|
||||
let name = meta
|
||||
.as_ref()
|
||||
.and_then(|m| m.name.as_deref())
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! and returns a confirmation.
|
||||
|
||||
use super::CommandContext;
|
||||
use crate::io::story_metadata::{clear_front_matter_field_in_content, parse_front_matter};
|
||||
use crate::db::yaml_legacy::{clear_front_matter_field_in_content, parse_front_matter};
|
||||
use std::path::Path;
|
||||
|
||||
/// Handle the `unblock` command.
|
||||
|
||||
@@ -148,7 +148,7 @@ fn find_story_name(root: &std::path::Path, num_str: &str) -> Option<String> {
|
||||
if file_num == num_str
|
||||
&& let Some(c) = crate::db::read_content(&id)
|
||||
{
|
||||
return crate::io::story_metadata::parse_front_matter(&c)
|
||||
return crate::db::yaml_legacy::parse_front_matter(&c)
|
||||
.ok()
|
||||
.and_then(|m| m.name);
|
||||
}
|
||||
@@ -182,7 +182,7 @@ fn find_story_name(root: &std::path::Path, num_str: &str) -> Option<String> {
|
||||
.unwrap_or("");
|
||||
if file_num == num_str {
|
||||
return std::fs::read_to_string(&path).ok().and_then(|c| {
|
||||
crate::io::story_metadata::parse_front_matter(&c)
|
||||
crate::db::yaml_legacy::parse_front_matter(&c)
|
||||
.ok()
|
||||
.and_then(|m| m.name)
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
use crate::agents::{AgentPool, AgentStatus};
|
||||
use crate::chat::util::strip_bot_mention;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::path::Path;
|
||||
|
||||
/// A parsed assign command from a Matrix message body.
|
||||
|
||||
@@ -71,7 +71,7 @@ pub async fn handle_delete(
|
||||
|
||||
let story_name = content
|
||||
.and_then(|contents| {
|
||||
crate::io::story_metadata::parse_front_matter(&contents)
|
||||
crate::db::yaml_legacy::parse_front_matter(&contents)
|
||||
.ok()
|
||||
.and_then(|m| m.name)
|
||||
})
|
||||
|
||||
@@ -90,7 +90,7 @@ pub async fn handle_start(
|
||||
|
||||
let story_name = content
|
||||
.and_then(|contents| {
|
||||
crate::io::story_metadata::parse_front_matter(&contents)
|
||||
crate::db::yaml_legacy::parse_front_matter(&contents)
|
||||
.ok()
|
||||
.and_then(|m| m.name)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user