瀏覽代碼

Search accepted MCPs using to-announce label

Santiago Pastorino 4 年之前
父節點
當前提交
4826a98913
共有 2 個文件被更改,包括 4 次插入15 次删除
  1. 2 13
      src/github.rs
  2. 2 2
      src/prioritization.rs

+ 2 - 13
src/github.rs

@@ -644,10 +644,7 @@ impl Repository {
             ..
         } = query;
 
-        let use_issues = exclude_labels.is_empty()
-            && filters
-                .iter()
-                .all(|&(key, _)| key != "no" && key != "closed-days-ago");
+        let use_issues = exclude_labels.is_empty() || filters.iter().any(|&(key, _)| key == "no");
         // negating filters can only be handled by the search api
         let url = if use_issues {
             self.build_issues_url(filters, include_labels)
@@ -708,15 +705,7 @@ impl Repository {
     ) -> String {
         let filters = filters
             .iter()
-            .map(|(key, val)| {
-                if *key == "closed-days-ago" {
-                    let last_week =
-                        Utc::now() - chrono::Duration::days(val.parse::<i64>().unwrap());
-                    format!("closed:>={}", last_week.format("%Y-%m-%d"))
-                } else {
-                    format!("{}:{}", key, val)
-                }
-            })
+            .map(|(key, val)| format!("{}:{}", key, val))
             .chain(
                 include_labels
                     .iter()

+ 2 - 2
src/prioritization.rs

@@ -237,8 +237,8 @@ pub fn agenda<'a>() -> Box<Step<'a>> {
         name: "mcp_accepted",
         query: github::Query {
             kind: github::QueryKind::List,
-            filters: vec![("state", "closed"), ("closed-days-ago", "7")],
-            include_labels: vec!["major-change-accepted"],
+            filters: vec![("state", "all")],
+            include_labels: vec!["major-change-accepted", "to-announce"],
             exclude_labels: vec![],
         },
     });