Skip to content

Commit

Permalink
Merge pull request #1739 from jackh726/types-agenda
Browse files Browse the repository at this point in the history
Add planning meeting agenda for types
  • Loading branch information
Mark-Simulacrum authored Nov 4, 2023
2 parents ee06e24 + bbbfa33 commit 911256e
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 1 deletion.
63 changes: 63 additions & 0 deletions src/agenda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,69 @@ pub fn lang_planning<'a>() -> Box<dyn Action + Send + Sync> {
})
}

pub fn types_planning<'a>() -> Box<dyn Action + Send + Sync> {
Box::new(Step {
name: "types_planning_agenda",
actions: vec![
Query {
repos: vec![("rust-lang", "types-team")],
queries: vec![
QueryMap {
name: "roadmap_tracking_issues",
kind: QueryKind::List,
query: Arc::new(github::Query {
filters: vec![("state", "open"), ("is", "issue")],
include_labels: vec!["roadmap-tracking-issue"],
exclude_labels: vec![],
}),
},
QueryMap {
name: "deep_dive_proposals",
kind: QueryKind::List,
query: Arc::new(github::Query {
filters: vec![("state", "open"), ("is", "issue")],
include_labels: vec!["deep-dive-proposal"],
exclude_labels: vec![],
}),
},
QueryMap {
name: "major_changes",
kind: QueryKind::List,
query: Arc::new(github::Query {
filters: vec![("state", "open"), ("is", "issue")],
include_labels: vec!["major-change"],
exclude_labels: vec![],
}),
},
],
},
Query {
repos: vec![("rust-lang", "rust")],
queries: vec![
QueryMap {
name: "nominated_issues",
kind: QueryKind::List,
query: Arc::new(github::Query {
filters: vec![("state", "open"), ("is", "issue")],
include_labels: vec!["I-types-nominated"],
exclude_labels: vec![],
}),
},
QueryMap {
name: "types_fcps",
kind: QueryKind::List,
query: Arc::new(github::Query {
filters: vec![("state", "open")],
include_labels: vec!["T-types", "proposed-final-comment-period"],
exclude_labels: vec![],
}),
},
],
},
],
})
}

// Things to add (maybe):
// - Compiler RFCs
// - P-high issues
Expand Down
23 changes: 23 additions & 0 deletions src/bin/types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use triagebot::agenda;

#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
dotenv::dotenv().ok();
tracing_subscriber::fmt::init();

let args: Vec<String> = std::env::args().collect();
if args.len() == 2 {
match &args[1][..] {
"planning" => {
let agenda = agenda::types_planning();
print!("{}", agenda.call().await?);
return Ok(());
}
_ => {}
}
}

eprintln!("Usage: types (planning)");

Ok(())
}
6 changes: 5 additions & 1 deletion templates/_issues_heading.tt
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{% import "_issue.tt" as issue %}

{% macro render(issues, heading="###", empty="No issues this time.") %}
{% macro render(issues, heading="###", empty="No issues this time.", split_url=true) %}
{%- for issue in issues %}
{% if split_url %}
{{heading}} "{{issue.title}}" {{issue.repo_name}}#{{issue.number}}

**Link:** {{issue.html_url}}
{% else %}
{{heading}} [{{issue.title}}]({{issue.html_url}})
{% endif %}
{%else%}

None.
Expand Down
29 changes: 29 additions & 0 deletions templates/types_planning_agenda.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% import "_issues_heading.tt" as issues_heading %}
{% import "_issues.tt" as issues %}
---
title: {{CURRENT_DATE}} Planning meeting
tags: weekly-meeting, T-types
date: {{CURRENT_DATE}}
---

# T-types planning meeting agenda

## Updates

{{-issues_heading::render(issues=roadmap_tracking_issues,split_url=false)}}

## Nominated issues

{{-issues_heading::render(issues=nominated_issues,split_url=false)}}

## Types FCPs

{{-issues_heading::render(issues=types_fcps,split_url=false)}}

## Major change proposals

{{-issues_heading::render(issues=major_changes,split_url=false)}}

## Deep dive planning

{{-issues_heading::render(issues=deep_dive_proposals,split_url=false)}}

0 comments on commit 911256e

Please sign in to comment.