(415e1c3) Fix worklane.ts tool when passed multi-line args
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ pub enum Command {
|
||||
|
||||
/// Ticket description
|
||||
#[arg(short, long)]
|
||||
description: Option<String>,
|
||||
description: Vec<String>,
|
||||
|
||||
/// Acceptance criteria (comma-separated)
|
||||
#[arg(short, long)]
|
||||
|
||||
+6
-4
@@ -89,7 +89,7 @@ pub fn cmd_ls(status_filter: &Option<String>, worklane_dir: &Path) -> Result<()>
|
||||
|
||||
pub fn cmd_add(
|
||||
title: &str,
|
||||
description: &Option<String>,
|
||||
description: &[String],
|
||||
acceptance: &[String],
|
||||
plan: &[String],
|
||||
tags: &[String],
|
||||
@@ -119,9 +119,11 @@ pub fn cmd_add(
|
||||
return Err(anyhow!("A ticket with this title already exists."));
|
||||
}
|
||||
|
||||
let description_text = description
|
||||
.as_deref()
|
||||
.unwrap_or("_No description provided._");
|
||||
let description_text = if description.is_empty() {
|
||||
"_No description provided._".to_string()
|
||||
} else {
|
||||
description.join("\n")
|
||||
};
|
||||
|
||||
let mut body = format!(
|
||||
"# {}\n\
|
||||
|
||||
Reference in New Issue
Block a user