Allow milestones to be closed and reopened
This commit is contained in:
@@ -527,12 +527,10 @@ impl GotchaCore {
|
||||
owner: String,
|
||||
repository: String,
|
||||
id: Option<i64>,
|
||||
title: String,
|
||||
description: String,
|
||||
due_date: Option<i64>,
|
||||
draft: MilestoneEditorPage,
|
||||
) -> Result<i64, GotchaError> {
|
||||
let (owner, repository) = validate_repository(&owner, &repository)?;
|
||||
let title = title.trim();
|
||||
let title = draft.title.trim();
|
||||
if title.is_empty() {
|
||||
return Err("Enter a milestone title.".into());
|
||||
}
|
||||
@@ -546,8 +544,9 @@ impl GotchaCore {
|
||||
id,
|
||||
MilestoneDraft {
|
||||
title: title.into(),
|
||||
description,
|
||||
due_date,
|
||||
description: draft.description,
|
||||
due_date: draft.due_date,
|
||||
closed: draft.closed,
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user