diff options
author | Cyborus <cyborus@cyborus.xyz> | 2024-05-10 23:30:13 +0200 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2024-05-10 23:30:13 +0200 |
commit | 142cb363d911a3698ae9023f3dccf402d5579caa (patch) | |
tree | b08637074de30d4932adde35a2c4f03926579e21 /src/issues.rs | |
parent | Merge pull request 'add pull request commands' (#52) from pr into main (diff) | |
download | forgejo-cli-142cb363d911a3698ae9023f3dccf402d5579caa.tar.xz forgejo-cli-142cb363d911a3698ae9023f3dccf402d5579caa.zip |
trim title before checks
Diffstat (limited to 'src/issues.rs')
-rw-r--r-- | src/issues.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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, |