ent list FILTER: add filter "done-time=[START]..[END]"

This commit is contained in:
Sebastian Kuzminsky 2025-07-16 21:28:15 -06:00
parent bc2b1bd3c1
commit a3077ca313
2 changed files with 47 additions and 0 deletions

View file

@ -41,6 +41,13 @@ enum Commands {
/// if prefixed with "-". Example: "tag=bug,-docs" shows issues
/// that are tagged "bug" and not tagged "docs". Defaults to
/// including all tags and excluding none.
///
/// "done-time": Time range of issue completion, in the form
/// "[START]..[END]". Includes issues that were marked Done
/// between START and END. START and END are both in RFC 3339
/// format, e.g. "YYYY-MM-DDTHH:MM:SS[+-]HH:MM". If START
/// is omitted, defaults to the beginning of time. If END is
/// omitted, defaults to the end of time.
filter: Vec<String>,
},
@ -138,6 +145,19 @@ fn handle_command(
}
}
if let Some(issue_done_time) = issue.done_time {
if let Some(start_done_time) = filter.start_done_time {
if start_done_time > issue_done_time {
continue;
}
}
if let Some(end_done_time) = filter.end_done_time {
if end_done_time < issue_done_time {
continue;
}
}
}
// This issue passed all the filters, include it in list.
uuids_by_state
.entry(issue.state.clone())