From 142cb363d911a3698ae9023f3dccf402d5579caa Mon Sep 17 00:00:00 2001 From: Cyborus Date: Fri, 10 May 2024 17:30:13 -0400 Subject: [PATCH] trim title before checks --- src/issues.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/issues.rs b/src/issues.rs index 4625309..ed2b9ab 100644 --- a/src/issues.rs +++ b/src/issues.rs @@ -375,6 +375,7 @@ pub async fn edit_title( title } }; + let new_title = new_title.trim(); if new_title.is_empty() { eyre::bail!("title cannot be empty"); } @@ -386,7 +387,7 @@ pub async fn edit_title( repo.name(), issue, forgejo_api::structs::EditIssueOption { - title: Some(new_title.trim().to_owned()), + title: Some(new_title.to_owned()), assignee: None, assignees: None, body: None,