Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ enum Commands {
/// Assignees for the GitHub issue (can be specified multiple times)
#[arg(short, long, action = clap::ArgAction::Append)]
assignee: Vec<String>,

/// Milestone for the GitHub issue
#[arg(short, long)]
milestone: Option<String>,
},
}

Expand All @@ -64,13 +68,15 @@ impl TryFrom<Cli> for Action {
body,
label,
assignee,
milestone,
} => Ok(Action::Report(Report {
title,
body: body
.map(std::fs::read_to_string)
.unwrap_or_else(|| std::io::read_to_string(std::io::stdin().lock()))?,
labels: label,
assignees: assignee,
milestone,
})),
}
}
Expand Down Expand Up @@ -112,6 +118,9 @@ pub struct Report {

#[serde(skip_serializing_if = "Vec::is_empty")]
assignees: Vec<String>,

#[serde(skip_serializing_if = "Option::is_none")]
milestone: Option<String>,
}

const RESOLVER_TIMEOUT: Duration = Duration::from_secs(5);
Expand Down
Loading