浏览代码

Migrate to tera and fix rendering variables on the same line issues

Santiago Pastorino 4 年之前
父节点
当前提交
f1beebb3d0
共有 11 个文件被更改,包括 333 次插入213 次删除
  1. 165 0
      Cargo.lock
  2. 4 0
      Cargo.toml
  3. 55 123
      src/meeting.rs
  4. 49 49
      src/prioritization.rs
  5. 4 0
      templates/_issue.tt
  6. 5 0
      templates/_issues.tt
  7. 29 27
      templates/agenda.tt
  8. 7 5
      templates/nominations.tt
  9. 5 3
      templates/prs_waiting_on_team.tt
  10. 5 3
      templates/regressions.tt
  11. 5 3
      templates/unpri_i_prioritize.tt

+ 165 - 0
Cargo.lock

@@ -103,6 +103,14 @@ dependencies = [
  "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "bstr"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "bumpalo"
 version = "2.6.0"
@@ -169,6 +177,16 @@ name = "core-foundation-sys"
 version = "0.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "crossbeam-utils"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "crypto-mac"
 version = "0.7.0"
@@ -422,6 +440,28 @@ name = "glob"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "globset"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "aho-corasick 0.7.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bstr 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "globwalk"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ignore 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "h2"
 version = "0.2.3"
@@ -564,6 +604,23 @@ dependencies = [
  "unicode-normalization 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "ignore"
+version = "0.4.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "globset 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "indexmap"
 version = "1.4.0"
@@ -644,6 +701,11 @@ dependencies = [
  "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "maplit"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
 [[package]]
 name = "matches"
 version = "0.1.8"
@@ -882,6 +944,45 @@ name = "percent-encoding"
 version = "2.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "pest"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "pest_derive"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pest_generator 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "pest_generator"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pest_meta 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "pest_meta"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "phf"
 version = "0.8.0"
@@ -1146,6 +1247,14 @@ name = "ryu"
 version = "1.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "schannel"
 version = "0.1.19"
@@ -1246,6 +1355,17 @@ dependencies = [
  "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "sha-1"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "sha2"
 version = "0.8.2"
@@ -1356,6 +1476,20 @@ dependencies = [
  "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "tera"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "globwalk 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "termcolor"
 version = "1.1.0"
@@ -1512,6 +1646,7 @@ dependencies = [
  "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_path_to_error 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tera 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-postgres 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1529,6 +1664,11 @@ name = "typenum"
 version = "1.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "ucd-trie"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
 [[package]]
 name = "unicase"
 version = "2.6.0"
@@ -1602,6 +1742,16 @@ name = "version_check"
 version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "walkdir"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "want"
 version = "0.3.0"
@@ -1782,6 +1932,7 @@ dependencies = [
 "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
 "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
 "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
+"checksum bstr 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931"
 "checksum bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708"
 "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
 "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
@@ -1792,6 +1943,7 @@ dependencies = [
 "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
 "checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
 "checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
+"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
 "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
 "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
 "checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
@@ -1823,6 +1975,8 @@ dependencies = [
 "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
 "checksum gimli 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
 "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
+"checksum globset 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120"
+"checksum globwalk 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "178270263374052c40502e9f607134947de75302c1348d1a0e31db67c1691446"
 "checksum h2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7938e6aa2a31df4e21f224dc84704bd31c089a6d1355c535b03667371cccc843"
 "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
 "checksum hermit-abi 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909"
@@ -1836,6 +1990,7 @@ dependencies = [
 "checksum hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa"
 "checksum hyperx 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81d7ed6ec7d25c4de28b999a5693f14609a8b756137b1b4cb4927d119f59ef25"
 "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
+"checksum ignore 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)" = "22dcbf2a4a289528dbef21686354904e1c694ac642610a9bff9e7df730d9ec72"
 "checksum indexmap 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe"
 "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
 "checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
@@ -1847,6 +2002,7 @@ dependencies = [
 "checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
 "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
 "checksum loom 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecc775857611e1df29abba5c41355cdf540e7e9d4acfdf0f355eefee82330b7"
+"checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
 "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
 "checksum md5 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
 "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
@@ -1872,6 +2028,10 @@ dependencies = [
 "checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
 "checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
 "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+"checksum pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
+"checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"
+"checksum pest_generator 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55"
+"checksum pest_meta 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d"
 "checksum phf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
 "checksum phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
 "checksum pin-project 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)" = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17"
@@ -1902,6 +2062,7 @@ dependencies = [
 "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
 "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
 "checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
+"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
 "checksum schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
 "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28"
 "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
@@ -1914,6 +2075,7 @@ dependencies = [
 "checksum serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226"
 "checksum serde_path_to_error 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "913be57cc4ce01e57709c49d3f9a73e0019ae0ba26c4063d7bc15351d68f3593"
 "checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97"
+"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
 "checksum sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
 "checksum siphasher 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7"
 "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
@@ -1927,6 +2089,7 @@ dependencies = [
 "checksum syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd"
 "checksum synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
 "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
+"checksum tera 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "55df25c7768a0fb9f165931366eb0f21587c407061e1e69c1f5c2b495adfd9bb"
 "checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
 "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
 "checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
@@ -1941,6 +2104,7 @@ dependencies = [
 "checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
 "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
 "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
+"checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
 "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
 "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
 "checksum unicode-normalization 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977"
@@ -1952,6 +2116,7 @@ dependencies = [
 "checksum vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
 "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
 "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
+"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
 "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
 "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
 "checksum wasm-bindgen 0.2.56 (registry+https://github.com/rust-lang/crates.io-index)" = "99de4b68939a880d530aed51289a7c7baee154e3ea8ac234b542c49da7134aaf"

+ 4 - 0
Cargo.toml

@@ -39,5 +39,9 @@ octocrab = "0.3"
 version = "1"
 features = ["derive"]
 
+[dependencies.tera]
+version = "1.3.1"
+default-features = false
+
 [profile.release]
 debug = 2

+ 55 - 123
src/meeting.rs

@@ -2,10 +2,9 @@ use async_trait::async_trait;
 
 use reqwest::Client;
 use std::env;
-use std::fs::File;
-use std::io::Read;
+use tera::{Context, Tera};
 
-use crate::github::{self, GithubClient, Issue, Repository};
+use crate::github::{self, GithubClient, Repository};
 
 pub struct Meeting<A: Action> {
     pub steps: Vec<A>,
@@ -31,32 +30,33 @@ pub struct QueryMap<'a> {
     pub query: github::Query<'a>,
 }
 
-pub trait Template: Send {
-    fn render(&self, pre: &str, post: &str) -> String;
-}
-
-pub struct FileTemplate<'a> {
-    name: &'a str,
-    map: Vec<(&'a str, Box<dyn Template>)>,
-}
-
-pub struct IssuesTemplate {
-    issues: Vec<Issue>,
-}
-
-pub struct IssueCountTemplate {
-    count: usize,
+#[derive(serde::Serialize)]
+pub struct IssueDecorator {
+    pub number: u64,
+    pub title: String,
+    pub html_url: String,
+    pub pr: String,
+    pub labels: String,
+    pub assignees: String,
 }
 
 #[async_trait]
 impl<'a> Action for Step<'a> {
     async fn call(&self) -> String {
+        let tera = match Tera::new("templates/*") {
+            Ok(t) => t,
+            Err(e) => {
+                println!("Parsing error(s): {}", e);
+                ::std::process::exit(1);
+            }
+        };
+
         let gh = GithubClient::new(
             Client::new(),
             env::var("GITHUB_API_TOKEN").expect("Missing GITHUB_API_TOKEN"),
         );
 
-        let mut map: Vec<(&str, Box<dyn Template>)> = Vec::new();
+        let mut context = Context::new();
 
         for Query { repo, queries } in &self.actions {
             let repository = Repository {
@@ -70,7 +70,40 @@ impl<'a> Action for Step<'a> {
 
                         match issues_search_result {
                             Ok(issues) => {
-                                map.push((*name, Box::new(IssuesTemplate::new(issues))));
+                                let issues_decorator: Vec<_> = issues
+                                    .iter()
+                                    .map(|issue| {
+                                        let pr = if issue.pull_request.is_some() {
+                                            // FIXME: link to PR.
+                                            // We need to tweak PullRequestDetails for this
+                                            "[has_pr] "
+                                        } else {
+                                            ""
+                                        }
+                                        .to_string();
+
+                                        IssueDecorator {
+                                            title: issue.title.clone(),
+                                            number: issue.number,
+                                            html_url: issue.html_url.clone(),
+                                            pr,
+                                            labels: issue
+                                                .labels
+                                                .iter()
+                                                .map(|l| l.name.as_ref())
+                                                .collect::<Vec<_>>()
+                                                .join(", "),
+                                            assignees: issue
+                                                .assignees
+                                                .iter()
+                                                .map(|u| u.login.as_ref())
+                                                .collect::<Vec<_>>()
+                                                .join(", "),
+                                        }
+                                    })
+                                    .collect();
+
+                                context.insert(*name, &issues_decorator);
                             }
                             Err(err) => {
                                 eprintln!("ERROR: {}", err);
@@ -87,7 +120,7 @@ impl<'a> Action for Step<'a> {
 
                         match count {
                             Ok(count) => {
-                                map.push((*name, Box::new(IssueCountTemplate::new(count))));
+                                context.insert(*name, &count);
                             }
                             Err(err) => {
                                 eprintln!("ERROR: {}", err);
@@ -102,107 +135,6 @@ impl<'a> Action for Step<'a> {
             }
         }
 
-        let template = FileTemplate::new(self.name, map);
-        template.render("", "")
-    }
-}
-
-impl<'a> FileTemplate<'a> {
-    fn new(name: &'a str, map: Vec<(&'a str, Box<dyn Template>)>) -> Self {
-        Self { name, map }
-    }
-}
-
-impl<'a> Template for FileTemplate<'a> {
-    fn render(&self, _pre: &str, _post: &str) -> String {
-        let relative_path = format!("templates/{}.tt", self.name);
-        let path = env::current_dir().unwrap().join(relative_path);
-        let path = path.as_path();
-        let mut file = File::open(path).unwrap();
-        let mut contents = String::new();
-        file.read_to_string(&mut contents).unwrap();
-
-        let mut replacements = Vec::new();
-
-        for (var, template) in &self.map {
-            let var = format!("{{{}}}", var);
-            for line in contents.lines() {
-                if line.contains(&var) {
-                    if let Some(var_idx) = line.find(&var) {
-                        let pre = &line[..var_idx];
-                        let post = &line[var_idx + var.len()..];
-                        replacements.push((line.to_string(), template.render(pre, post)));
-                    }
-                }
-            }
-        }
-
-        for (line, content) in replacements {
-            contents = contents.replace(&line, &content);
-        }
-
-        contents
-    }
-}
-
-impl IssuesTemplate {
-    fn new(issues: Vec<Issue>) -> Self {
-        Self { issues }
-    }
-}
-
-impl Template for IssuesTemplate {
-    fn render(&self, pre: &str, post: &str) -> String {
-        let mut out = String::new();
-
-        if !self.issues.is_empty() {
-            for issue in &self.issues {
-                let pr = if issue.pull_request.is_some() {
-                    // FIXME: link to PR.
-                    // We need to tweak PullRequestDetails for this
-                    "[has_pr] "
-                } else {
-                    ""
-                };
-
-                out.push_str(&format!(
-                    "{}\"{}\" [#{}]({}) {}labels=[{}] assignees=[{}]{}\n",
-                    pre,
-                    issue.title,
-                    issue.number,
-                    issue.html_url,
-                    pr,
-                    issue
-                        .labels
-                        .iter()
-                        .map(|l| l.name.as_ref())
-                        .collect::<Vec<_>>()
-                        .join(", "),
-                    issue
-                        .assignees
-                        .iter()
-                        .map(|u| u.login.as_ref())
-                        .collect::<Vec<_>>()
-                        .join(", "),
-                    post,
-                ));
-            }
-        } else {
-            out = format!("There are no issues this time.");
-        }
-
-        out
-    }
-}
-
-impl IssueCountTemplate {
-    fn new(count: usize) -> Self {
-        Self { count }
-    }
-}
-
-impl Template for IssueCountTemplate {
-    fn render(&self, pre: &str, post: &str) -> String {
-        format!("{}{}{}", pre, self.count, post)
+        tera.render(&format!("{}.tt", self.name), &context).unwrap()
     }
 }

+ 49 - 49
src/prioritization.rs

@@ -18,7 +18,7 @@ pub fn unpri_i_prioritize<'a>() -> Step<'a> {
     let mut queries = Vec::new();
 
     queries.push(QueryMap {
-        name: "unpri_i_prioritize.all",
+        name: "unpri_i_prioritize_all",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -28,7 +28,7 @@ pub fn unpri_i_prioritize<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "unpri_i_prioritize.t_compiler",
+        name: "unpri_i_prioritize_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -38,7 +38,7 @@ pub fn unpri_i_prioritize<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "unpri_i_prioritize.libs_impl",
+        name: "unpri_i_prioritize_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -60,7 +60,7 @@ pub fn regressions<'a>() -> Step<'a> {
     let mut queries = Vec::new();
 
     queries.push(QueryMap {
-        name: "regressions.stable_to_beta",
+        name: "regressions_stable_to_beta",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -79,7 +79,7 @@ pub fn regressions<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "regressions.stable_to_nightly",
+        name: "regressions_stable_to_nightly",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -98,7 +98,7 @@ pub fn regressions<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "regressions.stable_to_stable",
+        name: "regressions_stable_to_stable",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -129,7 +129,7 @@ pub fn nominations<'a>() -> Step<'a> {
     let mut queries = Vec::new();
 
     queries.push(QueryMap {
-        name: "nominations.stable_nominated",
+        name: "nominations_stable_nominated",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -139,7 +139,7 @@ pub fn nominations<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "nominations.beta_nominated",
+        name: "nominations_beta_nominated",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -149,7 +149,7 @@ pub fn nominations<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "nominations.i_nominated",
+        name: "nominations_i_nominated",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -159,7 +159,7 @@ pub fn nominations<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "nominations.i_nominated_t_compiler",
+        name: "nominations_i_nominated_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -169,7 +169,7 @@ pub fn nominations<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "nominations.i_nominated_libs_impl",
+        name: "nominations_i_nominated_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -191,7 +191,7 @@ pub fn prs_waiting_on_team<'a>() -> Step<'a> {
     let mut queries = Vec::new();
 
     queries.push(QueryMap {
-        name: "prs_waiting_on_team.all",
+        name: "prs_waiting_on_team_all",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -201,7 +201,7 @@ pub fn prs_waiting_on_team<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "prs_waiting_on_team.t_compiler",
+        name: "prs_waiting_on_team_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -211,7 +211,7 @@ pub fn prs_waiting_on_team<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "prs_waiting_on_team.libs_impl",
+        name: "prs_waiting_on_team_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -236,7 +236,7 @@ pub fn agenda<'a>() -> Step<'a> {
 
     // MCP queries
     queries.push(QueryMap {
-        name: "mcp.accepted",
+        name: "mcp_accepted",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "closed"), ("closed-days-ago", "7")],
@@ -246,7 +246,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "mcp.seconded",
+        name: "mcp_seconded",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -256,7 +256,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "mcp.new_not_seconded",
+        name: "mcp_new_not_seconded",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -266,7 +266,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "mcp.old_not_seconded",
+        name: "mcp_old_not_seconded",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -284,7 +284,7 @@ pub fn agenda<'a>() -> Step<'a> {
 
     // beta nomination queries
     queries.push(QueryMap {
-        name: "beta_nominated.t_compiler",
+        name: "beta_nominated_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -294,7 +294,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "beta_nominated.libs_impl",
+        name: "beta_nominated_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -304,7 +304,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "beta_nominated.t_rustdoc",
+        name: "beta_nominated_t_rustdoc",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -315,7 +315,7 @@ pub fn agenda<'a>() -> Step<'a> {
 
     // stable nomination queries
     queries.push(QueryMap {
-        name: "stable_nominated.t_compiler",
+        name: "stable_nominated_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -325,7 +325,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "stable_nominated.libs_impl",
+        name: "stable_nominated_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -335,7 +335,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "stable_nominated.t_rustdoc",
+        name: "stable_nominated_t_rustdoc",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![],
@@ -346,7 +346,7 @@ pub fn agenda<'a>() -> Step<'a> {
 
     // prs waiting on team queries
     queries.push(QueryMap {
-        name: "prs_waiting_on_team.t_compiler",
+        name: "prs_waiting_on_team_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -356,7 +356,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "prs_waiting_on_team.libs_impl",
+        name: "prs_waiting_on_team_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -367,7 +367,7 @@ pub fn agenda<'a>() -> Step<'a> {
 
     // issues of note queries
     queries.push(QueryMap {
-        name: "issues_of_note.p_critical",
+        name: "issues_of_note_p_critical",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -377,7 +377,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.unassigned_p_critical",
+        name: "issues_of_note_unassigned_p_critical",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open"), ("no", "assignee")],
@@ -387,7 +387,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.p_high",
+        name: "issues_of_note_p_high",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -397,7 +397,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.unassigned_p_high",
+        name: "issues_of_note_unassigned_p_high",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open"), ("no", "assignee")],
@@ -407,7 +407,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_beta.p-critical",
+        name: "issues_of_note_regression_from_stable_to_beta_p_critical",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -417,7 +417,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_beta.p-high",
+        name: "issues_of_note_regression_from_stable_to_beta_p_high",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -427,7 +427,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_beta.p-medium",
+        name: "issues_of_note_regression_from_stable_to_beta_p_medium",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -437,7 +437,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_beta.p-low",
+        name: "issues_of_note_regression_from_stable_to_beta_p_low",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -447,7 +447,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_nightly.p-critical",
+        name: "issues_of_note_regression_from_stable_to_nightly_p_critical",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -457,7 +457,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_nightly.p-high",
+        name: "issues_of_note_regression_from_stable_to_nightly_p_high",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -467,7 +467,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_nightly.p-medium",
+        name: "issues_of_note_regression_from_stable_to_nightly_p_medium",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -477,7 +477,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_nightly.p-low",
+        name: "issues_of_note_regression_from_stable_to_nightly_p_low",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -487,7 +487,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_stable.p-critical",
+        name: "issues_of_note_regression_from_stable_to_stable_p_critical",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -497,7 +497,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_stable.p-high",
+        name: "issues_of_note_regression_from_stable_to_stable_p_high",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -507,7 +507,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_stable.p-medium",
+        name: "issues_of_note_regression_from_stable_to_stable_p_medium",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -517,7 +517,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "issues_of_note.regression_from_stable_to_stable.p-low",
+        name: "issues_of_note_regression_from_stable_to_stable_p_low",
         query: github::Query {
             kind: github::QueryKind::Count,
             filters: vec![("state", "open")],
@@ -527,7 +527,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "p_critical.t_compiler",
+        name: "p_critical_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -537,7 +537,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "p_critical.libs_impl",
+        name: "p_critical_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -547,7 +547,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "p_critical.t_rustdoc",
+        name: "p_critical_t_rustdoc",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -557,7 +557,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "beta_regressions.unassigned_p_high",
+        name: "beta_regressions_unassigned_p_high",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open"), ("no", "assignee")],
@@ -567,7 +567,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "nightly_regressions.unassigned_p_high",
+        name: "nightly_regressions_unassigned_p_high",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open"), ("no", "assignee")],
@@ -577,7 +577,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "i_nominated.t_compiler",
+        name: "i_nominated_t_compiler",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],
@@ -587,7 +587,7 @@ pub fn agenda<'a>() -> Step<'a> {
     });
 
     queries.push(QueryMap {
-        name: "i_nominated.libs_impl",
+        name: "i_nominated_libs_impl",
         query: github::Query {
             kind: github::QueryKind::List,
             filters: vec![("state", "open")],

+ 4 - 0
templates/_issue.tt

@@ -0,0 +1,4 @@
+{% macro render(issue) -%}
+"{{issue.title}}" [#{{issue.number}}]({{issue.html_url}}) {{issue.pr}}labels=[{{issue.labels}}}] assignees=[{{issue.assignees}}]
+{%- endmacro %}
+

+ 5 - 0
templates/_issues.tt

@@ -0,0 +1,5 @@
+{% import "_issue.tt" as issue %}
+
+{% macro render(issues, indent="", empty="No issues this time.") -%}
+{% for issue in issues %}{{indent}}- {{issue::render(issue=issue)}}{% else %}{{indent}}- {{empty}}{% endfor %}
+{%- endmacro %}

+ 29 - 27
templates/agenda.tt

@@ -1,3 +1,5 @@
+{% import "_issues.tt" as issues %}
+
 ---
 tags: weekly, rustc
 ---
@@ -10,13 +12,13 @@ tags: weekly, rustc
 
 - Major Changes Proposals:
   - New accepted proposals
-    - {mcp.accepted}
+{{issues::render(issues=mcp_accepted, indent="    ", empty="No new accepted proposals this time.")}}
   - Seconded proposals (in FCP)
-    - {mcp.seconded}
+{{issues::render(issues=mcp_seconded, indent="    ", empty="No seconded proposals this time.")}}
   - New proposals (not seconded)
-    - {mcp.new_not_seconded}
+{{issues::render(issues=mcp_new_not_seconded, indent="    ", empty="No new proposals this time.")}}
   - Old proposals (not seconded)
-    - {mcp.old_not_seconded}
+{{issues::render(issues=mcp_old_not_seconded, indent="    ", empty="No old proposals this time.")}}
 
 ### WG checkins
 
@@ -29,67 +31,67 @@ tags: weekly, rustc
 ## Beta-nominations
 
 [T-compiler](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Abeta-nominated+-label%3Abeta-accepted+label%3AT-compiler)
-- {beta_nominated.t_compiler}
+{{issues::render(issues=beta_nominated_t_compiler, empty="No beta nominations this time.")}}
 
 [libs-impl](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Abeta-nominated+-label%3Abeta-accepted+label%3Alibs-impl)
-- {beta_nominated.libs_impl}
+{{issues::render(issues=beta_nominated_libs_impl, empty="No beta nominations this time.")}}
 
 [T-rustdoc](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Abeta-nominated+-label%3Abeta-accepted+label%3AT-rustdoc)
-- {beta_nominated.t_rustdoc}
+{{issues::render(issues=beta_nominated_t_rustdoc, empty="No beta nominations this time.")}}
 
 :back: / :shrug: / :hand:
 
 ## Stable-nominations
 
 [T-compiler](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Astable-nominated+-label%3Astable-accepted+label%3AT-compiler)
-- {stable_nominated.t_compiler}
+{{issues::render(issues=stable_nominated_t_compiler, empty="No stable nominations this time.")}}
 
 [libs-impl](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Astable-nominated+-label%3Astable-accepted+label%3Alibs-impl)
-- {stable_nominated.libs_impl}
+{{issues::render(issues=stable_nominated_libs_impl, empty="No stable nominations this time.")}}
 
 [T-rustdoc](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Astable-nominated+-label%3Astable-accepted+label%3AT-rustdoc)
-- {stable_nominated.t_rustdoc}
+{{issues::render(issues=stable_nominated_t_rustdoc, empty="No stable nominations this time.")}}
 
 :back: / :shrug: / :hand:
 
-## PR's S-waiting-on-team
+## PRs S-waiting-on-team
 
 [T-compiler](https://github.com/rust-lang/rust/pulls?utf8=%E2%9C%93&q=is%3Aopen+label%3AS-waiting-on-team+label%3AT-compiler)
-- {prs_waiting_on_team.t_compiler}
+{{issues::render(issues=prs_waiting_on_team_t_compiler, empty="No PRs waiting on T-compiler this time.")}}
 
 [libs-impl](https://github.com/rust-lang/rust/pulls?utf8=%E2%9C%93&q=is%3Aopen+label%3AS-waiting-on-team+label%3Alibs-impl)
-- {prs_waiting_on_team.libs_impl}
+{{issues::render(issues=prs_waiting_on_team_libs_impl, empty="No PRs wiating on libs-impl this time.")}}
 
 ## Issues of Note
 
 ### Short Summary
 
-- [{issues_of_note.p_critical} T-compiler P-critical issues](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-critical+)
-  - [{issues_of_note.unassigned_p_critical} of those are unassigned](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-critical+no%3Aassignee)
-- [{issues_of_note.p_high} T-compiler P-high issues](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-high+)
-  - [{issues_of_note.unassigned_p_high} of those are unassigned](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-high+no%3Aassignee)
-- [{issues_of_note.regression_from_stable_to_beta.p-critical} P-critical, {issues_of_note.regression_from_stable_to_beta.p-high} P-high, {issues_of_note.regression_from_stable_to_beta.p-medium} P-medium, {issues_of_note.regression_from_stable_to_beta.p-low} P-low regression-from-stable-to-beta](https://github.com/rust-lang/rust/labels/regression-from-stable-to-beta)
-- [{issues_of_note.regression_from_stable_to_nightly.p-critical} P-critical, {issues_of_note.regression_from_stable_to_nightly.p-high} P-high, {issues_of_note.regression_from_stable_to_nightly.p-medium} P-medium, {issues_of_note.regression_from_stable_to_nightly.p-low} P-low regression-from-stable-to-nightly](https://github.com/rust-lang/rust/labels/regression-from-stable-to-nightly)
-- [{issues_of_note.regression_from_stable_to_stable.p-critical} P-critical, {issues_of_note.regression_from_stable_to_stable.p-high} P-high, {issues_of_note.regression_from_stable_to_stable.p-medium} P-medium, {issues_of_note.regression_from_stable_to_stable.p-low} P-low regression-from-stable-to-stable](https://github.com/rust-lang/rust/labels/regression-from-stable-to-stable)
+- [{{issues_of_note_p_critical}} T-compiler P-critical issues](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-critical+)
+  - [{{issues_of_note_unassigned_p_critical}} of those are unassigned](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-critical+no%3Aassignee)
+- [{{issues_of_note_p_high}} T-compiler P-high issues](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-high+)
+  - [{{issues_of_note_unassigned_p_high}} of those are unassigned](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AT-compiler+label%3AP-high+no%3Aassignee)
+- [{{issues_of_note_regression_from_stable_to_beta_p_critical}} P-critical, {{issues_of_note_regression_from_stable_to_beta_p_high}} P-high, {{issues_of_note_regression_from_stable_to_beta_p_medium}} P-medium, {{issues_of_note_regression_from_stable_to_beta_p_low}} P-low regression-from-stable-to-beta](https://github.com/rust-lang/rust/labels/regression-from-stable-to-beta)
+- [{{issues_of_note_regression_from_stable_to_nightly_p_critical}} P-critical, {{issues_of_note_regression_from_stable_to_nightly_p_high}} P-high, {{issues_of_note_regression_from_stable_to_nightly_p_medium}} P-medium, {{issues_of_note_regression_from_stable_to_nightly_p_low}} P-low regression-from-stable-to-nightly](https://github.com/rust-lang/rust/labels/regression-from-stable-to-nightly)
+- [{{issues_of_note_regression_from_stable_to_stable_p_critical}} P-critical, {{issues_of_note_regression_from_stable_to_stable_p_high}} P-high, {{issues_of_note_regression_from_stable_to_stable_p_medium}} P-medium, {{issues_of_note_regression_from_stable_to_stable_p_low}} P-low regression-from-stable-to-stable](https://github.com/rust-lang/rust/labels/regression-from-stable-to-stable)
 
 ### P-critical
 
 [T-compiler](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AP-critical+label%3AT-compiler)
-- {p_critical.t_compiler}
+{{issues::render(issues=p_critical_t_compiler, empty="No P-critical issues for T-compiler this time.")}}
 
 [libs-impl](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AP-critical+label%3Alibs-impl)
-- {p_critical.libs_impl}
+{{issues::render(issues=p_critical_libs_impl, empty="No P-critical issues for libs-impl this time.")}}
 
 [T-rustdoc](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AP-critical+label%3AT-rustdoc)
-- {p_critical.t_rustdoc}
+{{issues::render(issues=p_critical_t_rustdoc, empty="No P-critical issues for T-rustdoc this time.")}}
 
 ### Unassigned P-high regressions
 
 [Beta regressions](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Aregression-from-stable-to-beta+P-high+no%3Aassignee)
-- {beta_regressions.unassigned_p_high}
+{{issues::render(issues=beta_regressions_unassigned_p_high, empty="No unassigned P-high beta regressions this time.")}}
 
 [Nightly regressions](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Aregression-from-stable-to-nightly+P-high+no%3Aassignee)
-- {nightly_regressions.unassigned_p_high}
+{{issues::render(issues=nightly_regressions_unassigned_p_high, empty="No unassigned P-high nightly regressions this time.")}}
 
 ## Performance logs
 
@@ -99,7 +101,7 @@ tags: weekly, rustc
 ## Nominated Issues
 
 [T-compiler](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AI-nominated+label%3AT-compiler)
-- {i_nominated.t_compiler}
+{{issues::render(issues=i_nominated_t_compiler, empty="No nominated issues for T-compiler this time.")}}
 
 [libs-impl](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AI-nominated+label%3Alibs-impl)
-- {i_nominated.libs_impl}
+{{issues::render(issues=i_nominated_libs_impl, empty="No nominated issues for libs-impl this time.")}}

+ 7 - 5
templates/nominations.tt

@@ -1,3 +1,5 @@
+{% import "_issues.tt" as issues %}
+
 ## Stable nominations
 
 - [All stable nominations](https://github.com/rust-lang/rust/issues?q=is%3Aall+label%3Astable-nominated+-label%3Astable-accepted)
@@ -6,7 +8,7 @@
 
 ### Issues
 
-{nominations.stable_nominated}
+{{issues::render(issues=nominations_stable_nominated, empty="There are no stable nominations this time.")}}
 
 ## Beta nominations
 
@@ -16,7 +18,7 @@
 
 ### Issues
 
-- {nominations.beta_nominated}
+{{issues::render(issues=nominations_beta_nominated, empty="There are no beta nominations this time.")}}
 
 ## I-nominated
 
@@ -26,7 +28,7 @@
 
 ### Issues
 
-- {nominations.i_nominated}
+{{issues::render(issues=nominations_i_nominated, empty="There are no I-nominated issues this time.")}}
 
 2. [I-nominated T-compiler](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AI-nominated+label%3AT-compiler)
     - Remove leftovers from last meeting.
@@ -34,7 +36,7 @@
 
 ### Issues
 
-- {nominations.i_nominated_t_compiler}
+{{issues::render(issues=nominations_i_nominated_t_compiler, empty="There are no I-nominated issues for T-compiler this time.")}}
 
 3. [I-nominated libs-impl](https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3AI-nominated+label%3Alibs-impl)
     - Remove leftovers from last meeting.
@@ -42,4 +44,4 @@
 
 ### Issues
 
-- {nominations.i_nominated_libs_impl}
+{{issues::render(issues=nominations_i_nominated_libs_impl, empty="There are no I-nominated issues for libs-impl this time.")}}

+ 5 - 3
templates/prs_waiting_on_team.tt

@@ -1,3 +1,5 @@
+{% import "_issues.tt" as issues %}
+
 ## PR's waiting for on team
 
 1. [All PR's waiting on team](https://github.com/rust-lang/rust/labels/S-waiting-on-team)
@@ -6,18 +8,18 @@
 
 ### Issues
 
-- {prs_waiting_on_team.all}
+{{issues::render(issues=prs_waiting_on_team_all, empty="There are no PR's waiting on team this time.")}}
 
 2. [PR's waiting on T-compiler](https://github.com/rust-lang/rust/pulls?q=is%3Aopen+is%3Apr+label%3AS-waiting-on-team+label%3AT-compiler)
     - Explicitly nominate any that you think may be able to be resolved *quickly* in triage meeting.
 
 ### Issues
 
-- {prs_waiting_on_team.t_compiler}
+{{issues::render(issues=prs_waiting_on_team_t_compiler, empty="There are no PR's waiting on T-compiler this time.")}}
 
 3. [PR's waiting on libs-impl](https://github.com/rust-lang/rust/pulls?q=is%3Aopen+is%3Apr+label%3AS-waiting-on-team+label%3Alibs-impl)
     - Explicitly nominate any that you think may be able to be resolved *quickly* in triage meeting.
 
 ### Issues
 
-- {prs_waiting_on_team.libs_impl}
+{{issues::render(issues=prs_waiting_on_team_libs_impl, empty="There are no PR's waiting on libs-impl this time.")}}

+ 5 - 3
templates/regressions.tt

@@ -1,3 +1,5 @@
+{% import "_issues.tt" as issues %}
+
 ## Regressions
 
 1. [Beta regressions without P-label](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3Aregression-from-stable-to-beta+-label%3AP-critical+-label%3AP-high+-label%3AP-medium+-label%3AP-low+-label%3AT-infra+-label%3AT-libs+-label%3AT-release+-label%3AT-rustdoc)
@@ -7,7 +9,7 @@
 
 ### Issues
 
-- {regressions.stable_to_beta}
+{{issues::render(issues=regressions_stable_to_beta, empty="There are no stable to beta regressions this time.")}}
 
 2. [Nightly regressions without P-label](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3Aregression-from-stable-to-nightly+-label%3AP-critical+-label%3AP-high+-label%3AP-medium+-label%3AP-low+-label%3AT-infra+-label%3AT-libs+-label%3AT-release+-label%3AT-rustdoc)
 - Prioritize.
@@ -16,7 +18,7 @@
 
 ### Issues
 
-- {regressions.stable_to_nightly}
+{{issues::render(issues=regressions_stable_to_nightly, empty="There are no stable to nightly regressions this time.")}}
 
 3. [Stable regressions without P-label](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3Aregression-from-stable-to-stable+-label%3AP-critical+-label%3AP-high+-label%3AP-medium+-label%3AP-low+-label%3AT-infra+-label%3AT-libs+-label%3AT-release+-label%3AT-rustdoc)
     - Prioritize (once we have this under control).
@@ -25,4 +27,4 @@
 
 ### Issues
 
-- {regressions.stable_to_stable}
+{{issues::render(issues=regressions_stable_to_stable, empty="There are no stable to stable regressions this time.")}}

+ 5 - 3
templates/unpri_i_prioritize.tt

@@ -1,3 +1,5 @@
+{% import "_issues.tt" as issues %}
+
 ## Unprioritized I-prioritize
 
 1. [All unprioritized I-prioritize](https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+-label%3AP-critical+-label%3AP-high+-label%3AP-medium+-label%3AP-low+label%3AI-prioritize)
@@ -6,7 +8,7 @@
 
 ### Issues
 
-- {unpri_i_prioritize.all}
+{{issues::render(issues=unpri_i_prioritize_all, empty="There are no unprioritized I-prioritize issues this time.")}}
 
 2. [T-compiler](https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AT-compiler+-label%3AP-critical+-label%3AP-high+-label%3AP-medium+-label%3AP-low+label%3AI-prioritize)
     - Prioritize issues and remove nomination of the ones not worth discussing.
@@ -15,7 +17,7 @@
 
 ### Issues
 
-- {unpri_i_prioritize.t_compiler}
+{{issues::render(issues=unpri_i_prioritize_t_compiler, empty="There are no unprioritized I-prioritize issues for T-compiler this time.")}}
 
 3. [libs-impl](https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3Alibs-impl+-label%3AP-critical+-label%3AP-high+-label%3AP-medium+-label%3AP-low+label%3AI-prioritize)
     - Prioritize issues and remove nomination of the ones not worth discussing.
@@ -24,4 +26,4 @@
 
 ### Issues
 
-- {unpri_i_prioritize.libs_impl}
+{{issues::render(issues=unpri_i_prioritize_libs_impl, empty="There are no unprioritized I-prioritize issues for libs-impl this time.")}}