diff --git a/src/common/cob/issue.rs b/src/common/cob/issue.rs index d5a9bdaf..6fe464a2 100644 --- a/src/common/cob/issue.rs +++ b/src/common/cob/issue.rs @@ -63,6 +63,10 @@ impl Filter { self } + pub fn state(&self) -> Option { + self.state.clone() + } + pub fn matches(&self, profile: &Profile, issue: &Issue) -> bool { let matches_state = match self.state { Some(State::Open) => matches!(issue.state(), issue::State::Open), diff --git a/src/common/cob/patch.rs b/src/common/cob/patch.rs index 63da2572..289ccaa8 100644 --- a/src/common/cob/patch.rs +++ b/src/common/cob/patch.rs @@ -64,6 +64,10 @@ impl Filter { self } + pub fn state(&self) -> Option { + self.state.clone() + } + pub fn matches(&self, profile: &Profile, patch: &Patch) -> bool { let matches_state = match self.state { Some(State::Draft) => matches!(patch.state(), patch::State::Draft),