trim title before checks

This commit is contained in:
Cyborus 2024-05-10 17:30:13 -04:00
parent 32babc3e1d
commit 142cb363d9
No known key found for this signature in database

View file

@ -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,