@@ -17,19 +17,29 @@ const RUST_PROJECT_GOALS_REPO: &'static str = "rust-lang/rust-project-goals";
17
17
const GOALS_STREAM : u64 = 435869 ; // #project-goals
18
18
const C_TRACKING_ISSUE : & str = "C-tracking-issue" ;
19
19
20
- const MESSAGE : & str = r#"
21
- Dear $OWNERS, it's been $DAYS days since the last update to your goal *$GOAL*.
20
+ fn message (
21
+ zulip_owners : & str ,
22
+ days : & str ,
23
+ issue_number : u64 ,
24
+ issue_title : & str ,
25
+ next_update : & str ,
26
+ ) -> String {
27
+ format ! (
28
+ r#"
29
+ Dear {zulip_owners}, it's been {days} days since the last update to your goal *{issue_title}*.
22
30
23
- We will begin drafting the next blog post collecting goal updates $NEXT_UPDATE .
31
+ We will begin drafting the next blog post collecting goal updates {next_update} .
24
32
25
- Please comment on the github tracking issue goals#$GOALNUM before then. Thanks! <3
33
+ Please comment on the github tracking issue goals#{issue_number} before then. Thanks! <3
26
34
27
35
Here is a suggested template for updates (feel free to drop the items that don't apply):
28
36
29
37
* **Key developments:** *What has happened since the last time. It's perfectly ok to list "nothing" if that's the truth, we know people get busy.*
30
38
* **Blockers:** *List any Rust teams you are waiting on and what you are waiting for.*
31
39
* **Help wanted:** *Are there places where you are looking for contribution or feedback from the broader community?*
32
- "# ;
40
+ "#
41
+ )
42
+ }
33
43
34
44
pub struct ProjectGoalsUpdateJob ;
35
45
@@ -146,19 +156,17 @@ pub async fn ping_project_goals_owners(
146
156
continue ;
147
157
} ;
148
158
149
- let message = MESSAGE
150
- . replace ( "$OWNERS" , & zulip_owners)
151
- . replace (
152
- "$DAYS" ,
153
- & if comments <= 1 {
154
- "∞" . to_string ( )
155
- } else {
156
- days_since_last_comment. to_string ( )
157
- } ,
158
- )
159
- . replace ( "$GOALNUM" , & issue. number . to_string ( ) )
160
- . replace ( "$GOAL" , & issue. title )
161
- . replace ( "$NEXT_UPDATE" , next_update) ;
159
+ let message = message (
160
+ & zulip_owners,
161
+ & if comments <= 1 {
162
+ "∞" . to_string ( )
163
+ } else {
164
+ days_since_last_comment. to_string ( )
165
+ } ,
166
+ issue. number ,
167
+ & issue. title ,
168
+ next_update,
169
+ ) ;
162
170
163
171
let zulip_req = crate :: zulip:: MessageApiRequest {
164
172
recipient : Recipient :: Stream {
0 commit comments