huskies: merge 827
This commit is contained in:
@@ -69,6 +69,9 @@ pub struct StoryMetadata {
|
||||
/// Present on items created with numeric-only IDs (no slug suffix).
|
||||
/// Used by the pipeline to determine routing (e.g. spikes skip QA).
|
||||
pub item_type: Option<String>,
|
||||
/// Set to `true` when the auto-assigner has already spawned a mergemaster
|
||||
/// session for a content-conflict failure. Prevents repeated spawns.
|
||||
pub mergemaster_attempted: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -110,6 +113,9 @@ struct FrontMatter {
|
||||
/// Item type: "story", "bug", "spike", or "refactor".
|
||||
#[serde(rename = "type")]
|
||||
item_type: Option<String>,
|
||||
/// Set to `true` when the auto-assigner has already spawned a mergemaster
|
||||
/// session for a content-conflict failure.
|
||||
mergemaster_attempted: Option<bool>,
|
||||
}
|
||||
|
||||
pub fn parse_front_matter(contents: &str) -> Result<StoryMetadata, StoryMetaError> {
|
||||
@@ -153,6 +159,7 @@ fn build_metadata(front: FrontMatter) -> StoryMetadata {
|
||||
frozen: front.frozen,
|
||||
run_tests_passed: front.run_tests_passed,
|
||||
item_type: front.item_type,
|
||||
mergemaster_attempted: front.mergemaster_attempted,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,6 +504,14 @@ pub fn write_review_hold_in_content(contents: &str) -> String {
|
||||
set_front_matter_field(contents, "review_hold", "true")
|
||||
}
|
||||
|
||||
/// Write `mergemaster_attempted: true` to story content (pure function).
|
||||
///
|
||||
/// Used by the auto-assigner to record that a mergemaster session has been
|
||||
/// spawned for a content-conflict failure, preventing repeated auto-spawns.
|
||||
pub fn write_mergemaster_attempted_in_content(contents: &str) -> String {
|
||||
set_front_matter_field(contents, "mergemaster_attempted", "true")
|
||||
}
|
||||
|
||||
/// Write or update `depends_on` in story content (pure function).
|
||||
///
|
||||
/// Serialises `deps` as an inline YAML sequence, e.g. `[477, 478]`.
|
||||
|
||||
Reference in New Issue
Block a user