ent list now accepts a filter, default "state=New,Backlog,Blocked,InProgress"
This commit is contained in:
parent
4d6e18a9f4
commit
7d9284bf91
3 changed files with 50 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ use std::str::FromStr;
|
|||
#[cfg(feature = "log")]
|
||||
use log::debug;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, serde::Deserialize)]
|
||||
/// These are the states an issue can be in.
|
||||
pub enum State {
|
||||
New,
|
||||
|
|
@ -38,6 +38,8 @@ pub enum IssueError {
|
|||
CommentError(#[from] crate::comment::CommentError),
|
||||
#[error("Failed to parse issue")]
|
||||
IssueParseError,
|
||||
#[error("Failed to parse state")]
|
||||
StateParseError,
|
||||
#[error("Failed to run git")]
|
||||
GitError(#[from] crate::git::GitError),
|
||||
#[error("Failed to run editor")]
|
||||
|
|
@ -61,7 +63,7 @@ impl FromStr for State {
|
|||
} else if s == "wontdo" {
|
||||
Ok(State::WontDo)
|
||||
} else {
|
||||
Err(IssueError::IssueParseError)
|
||||
Err(IssueError::StateParseError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -75,7 +77,6 @@ impl fmt::Display for State {
|
|||
State::InProgress => "inprogress",
|
||||
State::Done => "done",
|
||||
State::WontDo => "wontdo",
|
||||
|
||||
};
|
||||
write!(f, "{fmt_str}")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue