Browse Source

modify lang agenda, introduce planning agenda

Niko Matsakis 3 years ago
parent
commit
b4ae9aa6f2
5 changed files with 134 additions and 11 deletions
  1. 68 0
      src/agenda.rs
  2. 0 11
      src/bin/lang-agenda.rs
  3. 26 0
      src/bin/lang.rs
  4. 4 0
      templates/lang_agenda.tt
  5. 36 0
      templates/lang_planning_agenda.tt

+ 68 - 0
src/agenda.rs

@@ -548,6 +548,22 @@ pub fn lang<'a>() -> Box<dyn Action> {
                     },
                 ],
             },
+            Query {
+                repos: vec!["rust-lang/rfcs"],
+                queries: vec![QueryMap {
+                    name: "rfcs_waiting_to_be_merged",
+                    query: github::Query {
+                        kind: github::QueryKind::List,
+                        filters: vec![("state", "open"), ("is", "pr")],
+                        include_labels: vec![
+                            "disposition-merge",
+                            "finished-final-comment-period",
+                            "T-lang",
+                        ],
+                        exclude_labels: vec![],
+                    },
+                }],
+            },
             Query {
                 repos: vec![
                     "rust-lang/rfcs",
@@ -606,3 +622,55 @@ pub fn lang<'a>() -> Box<dyn Action> {
         ],
     })
 }
+
+pub fn lang_planning<'a>() -> Box<dyn Action> {
+    Box::new(Step {
+        name: "lang_planning_agenda",
+        actions: vec![
+            Query {
+                repos: vec!["rust-lang/lang-team"],
+                queries: vec![
+                    QueryMap {
+                        name: "pending_project_proposals",
+                        query: github::Query {
+                            kind: github::QueryKind::List,
+                            filters: vec![("state", "open"), ("is", "issue")],
+                            include_labels: vec!["major-change"],
+                            exclude_labels: vec!["charter-needed"],
+                        },
+                    },
+                    QueryMap {
+                        name: "pending_lang_team_prs",
+                        query: github::Query {
+                            kind: github::QueryKind::List,
+                            filters: vec![("state", "open"), ("is", "pr")],
+                            include_labels: vec![],
+                            exclude_labels: vec![],
+                        },
+                    },
+                    QueryMap {
+                        name: "proposed_meetings",
+                        query: github::Query {
+                            kind: github::QueryKind::List,
+                            filters: vec![("state", "open"), ("is", "issue")],
+                            include_labels: vec!["meeting-proposal"],
+                            exclude_labels: vec!["meeting-scheduled"],
+                        },
+                    },
+                ],
+            },
+            Query {
+                repos: vec!["rust-lang/lang-team"],
+                queries: vec![QueryMap {
+                    name: "active_initiatives",
+                    query: github::Query {
+                        kind: github::QueryKind::List,
+                        filters: vec![("state", "open"), ("is", "issue")],
+                        include_labels: vec!["lang-initiative"],
+                        exclude_labels: vec![],
+                    },
+                }],
+            },
+        ],
+    })
+}

+ 0 - 11
src/bin/lang-agenda.rs

@@ -1,11 +0,0 @@
-use triagebot::{agenda, logger};
-
-#[tokio::main(flavor = "current_thread")]
-async fn main() {
-    dotenv::dotenv().ok();
-    logger::init();
-
-    let agenda = agenda::lang();
-
-    print!("{}", agenda.call().await);
-}

+ 26 - 0
src/bin/lang.rs

@@ -0,0 +1,26 @@
+use triagebot::{agenda, logger};
+
+#[tokio::main(flavor = "current_thread")]
+async fn main() {
+    dotenv::dotenv().ok();
+    logger::init();
+
+    let args: Vec<String> = std::env::args().collect();
+    if args.len() == 2 {
+        match &args[1][..] {
+            "agenda" => {
+                let agenda = agenda::lang();
+                print!("{}", agenda.call().await);
+                return;
+            }
+            "planning" => {
+                let agenda = agenda::lang_planning();
+                print!("{}", agenda.call().await);
+                return;
+            }
+            _ => {}
+        }
+    }
+
+    eprintln!("Usage: lang (agenda|planning)")
+}

+ 4 - 0
templates/lang_agenda.tt

@@ -35,6 +35,10 @@ tags: triage-meeting
 
 {{-issues_heading::render(issues=pending_lang_team_prs)}}
 
+## RFCs waiting to be merged
+
+{{-issues_heading::render(issues=rfcs_waiting_to_be_merged)}}
+
 ## Proposed FCPs
 
 **Check your boxes!**

+ 36 - 0
templates/lang_planning_agenda.tt

@@ -0,0 +1,36 @@
+{% import "_issues_heading.tt" as issues_heading %}
+{% import "_issues.tt" as issues %}
+---
+title: Planning meeting DATE
+tags: planning-meeting
+---
+
+# T-lang planning meeting agenda
+
+* Meeting date: DATE
+
+## Attendance
+
+* Team members:
+* Others:
+
+## Meeting roles
+
+* Action item scribe:
+* Note-taker:
+
+## Proposed meetings
+
+{{-issues::render(issues=proposed_meetings, indent="", empty="None.")}}
+
+## Active initiatives
+
+{{-issues_heading::render(issues=active_initiatives)}}
+
+## Pending proposals on the lang-team repo
+
+{{-issues_heading::render(issues=pending_project_proposals)}}
+
+## Pending PRs on the lang-team repo
+
+{{-issues_heading::render(issues=pending_lang_team_prs)}}