huskies: merge 640_bug_create_story_create_refactor_create_bug_silently_drop_the_depends_on_parameter
This commit is contained in:
@@ -676,6 +676,11 @@ fn handle_tools_list(id: Option<Value>) -> JsonRpcResponse {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Optional list of acceptance criteria for the fix"
|
||||
},
|
||||
"depends_on": {
|
||||
"type": "array",
|
||||
"items": { "type": "integer" },
|
||||
"description": "Optional list of story numbers this bug depends on (e.g. [42, 43]). Persisted as depends_on in YAML front matter."
|
||||
}
|
||||
},
|
||||
"required": ["name", "description", "steps_to_reproduce", "actual_result", "expected_result"]
|
||||
@@ -707,6 +712,11 @@ fn handle_tools_list(id: Option<Value>) -> JsonRpcResponse {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Optional list of acceptance criteria"
|
||||
},
|
||||
"depends_on": {
|
||||
"type": "array",
|
||||
"items": { "type": "integer" },
|
||||
"description": "Optional list of story numbers this refactor depends on (e.g. [42, 43]). Persisted as depends_on in YAML front matter."
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
|
||||
@@ -489,6 +489,9 @@ pub(super) fn tool_create_bug(args: &Value, ctx: &AppContext) -> Result<String,
|
||||
let acceptance_criteria: Option<Vec<String>> = args
|
||||
.get("acceptance_criteria")
|
||||
.and_then(|v| serde_json::from_value(v.clone()).ok());
|
||||
let depends_on: Option<Vec<u32>> = args
|
||||
.get("depends_on")
|
||||
.and_then(|v| serde_json::from_value(v.clone()).ok());
|
||||
|
||||
let root = ctx.state.get_project_root()?;
|
||||
let bug_id = create_bug_file(
|
||||
@@ -499,6 +502,7 @@ pub(super) fn tool_create_bug(args: &Value, ctx: &AppContext) -> Result<String,
|
||||
actual_result,
|
||||
expected_result,
|
||||
acceptance_criteria.as_deref(),
|
||||
depends_on.as_deref(),
|
||||
)?;
|
||||
|
||||
Ok(format!("Created bug: {bug_id}"))
|
||||
@@ -689,10 +693,18 @@ pub(super) fn tool_create_refactor(args: &Value, ctx: &AppContext) -> Result<Str
|
||||
let acceptance_criteria: Option<Vec<String>> = args
|
||||
.get("acceptance_criteria")
|
||||
.and_then(|v| serde_json::from_value(v.clone()).ok());
|
||||
let depends_on: Option<Vec<u32>> = args
|
||||
.get("depends_on")
|
||||
.and_then(|v| serde_json::from_value(v.clone()).ok());
|
||||
|
||||
let root = ctx.state.get_project_root()?;
|
||||
let refactor_id =
|
||||
create_refactor_file(&root, name, description, acceptance_criteria.as_deref())?;
|
||||
let refactor_id = create_refactor_file(
|
||||
&root,
|
||||
name,
|
||||
description,
|
||||
acceptance_criteria.as_deref(),
|
||||
depends_on.as_deref(),
|
||||
)?;
|
||||
|
||||
Ok(format!("Created refactor: {refactor_id}"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user