Issue.assignees can be null

This commit is contained in:
Paul Campbell 2023-12-22 10:55:02 +00:00
parent 290922d296
commit b0934cdcac
2 changed files with 2 additions and 1 deletions

View file

@ -34,6 +34,7 @@ impl EditIssueOption {
assignee: issue.assignee.as_ref().map(|user| user.login_name.clone()),
assignees: issue
.assignees
.unwrap_or_default()
.iter()
.map(|user| user.login_name.clone())
.collect::<Vec<_>>(),

View file

@ -57,7 +57,7 @@ pub struct Issue {
/// The user assigned to the issue.
pub assignee: Option<User>,
/// List of assignees.
pub assignees: Vec<User>,
pub assignees: Option<Vec<User>>,
/// The body of the issue.
pub body: String,
/// The date and time when the issue was closed (if closed).