浏览代码

Add top unreviewed PRs to prioritization agenda

Santiago Pastorino 3 年之前
父节点
当前提交
da8b6b2398
共有 2 个文件被更改,包括 20 次插入0 次删除
  1. 15 0
      src/agenda.rs
  2. 5 0
      templates/prioritization_agenda.tt

+ 15 - 0
src/agenda.rs

@@ -474,6 +474,21 @@ pub fn prioritization<'a>() -> Box<dyn Action> {
         },
     });
 
+    let mut ordering = HashMap::new();
+    ordering.insert("sort", "updated");
+    ordering.insert("per_page", "5");
+
+    queries.push(QueryMap {
+        name: "top_unreviewed_prs",
+        query: github::Query {
+            kind: github::QueryKind::List,
+            filters: vec![("state", "open"), ("is", "pull-request"), ("-is", "draft")],
+            include_labels: vec!["S-waiting-on-review", "T-compiler"],
+            exclude_labels: vec![],
+            ordering,
+        },
+    });
+
     actions.push(Query {
         repos: vec!["rust-lang/rust"],
         queries,

+ 5 - 0
templates/prioritization_agenda.tt

@@ -48,6 +48,11 @@ tags: weekly, rustc
 [T-compiler](https://github.com/rust-lang/rust/pulls?utf8=%E2%9C%93&q=is%3Aopen+label%3AS-waiting-on-team+label%3AT-compiler)
 {{-issues::render(issues=prs_waiting_on_team_t_compiler, empty="No PRs waiting on `T-compiler` this time.")}}
 
+### Top unreviewed PRs
+
+[T-compiler](https://github.com/rust-lang/rust/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc+label%3AS-waiting-on-review+-is%3Adraft+)
+{{-issues::render(issues=top_unreviewed_prs, empty="No unreviewed PRs on `T-compiler` this time.")}}
+
 ## Issues of Note
 
 ### Short Summary