You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"@*{}*: Proposal [#{}]({}) has been seconded, but there are unresolved concerns preventing approval, use `@{} resolve concern-name` in the GitHub thread to resolve them.",
274
-
config.zulip_ping,
275
-
issue.number,
276
-
event.html_url().unwrap(),
277
-
&ctx.username,
278
-
)
271
+
let already_seconded = issue
272
+
.labels()
273
+
.iter()
274
+
.any(|l| &l.name == &config.second_label);
275
+
276
+
let zulip_ping = &config.zulip_ping;
277
+
let issue_number = issue.number;
278
+
let issue_url = &issue.html_url;
279
+
let bot_username = &ctx.username;
280
+
let waiting_period = config.waiting_period;
281
+
282
+
let zulip_msg = if already_seconded {
283
+
if has_concerns {
284
+
format!(
285
+
"@*{zulip_ping}*: Proposal [#{issue_number}]({issue_url}) has been seconded again, but there are unresolved concerns preventing approval, use `@{bot_username} resolve concern-name` in the GitHub thread to resolve them.",
286
+
)
287
+
}else{
288
+
format!(
289
+
"@*{zulip_ping}*: Proposal [#{issue_number}]({issue_url}) has been seconded again, and will be approved in maximum {waiting_period} days if no objections are raised.",
290
+
)
291
+
}
279
292
}else{
280
-
format!(
281
-
"@*{}*: Proposal [#{}]({}) has been seconded, and will be approved in {} days if no objections are raised.",
282
-
config.zulip_ping,
283
-
issue.number,
284
-
event.html_url().unwrap(),
285
-
config.waiting_period,
286
-
)
293
+
if has_concerns {
294
+
format!(
295
+
"@*{zulip_ping}*: Proposal [#{issue_number}]({issue_url}) has been seconded, but there are unresolved concerns preventing approval, use `@{bot_username} resolve concern-name` in the GitHub thread to resolve them.",
296
+
)
297
+
}else{
298
+
format!(
299
+
"@*{zulip_ping}*: Proposal [#{issue_number}]({issue_url}) has been seconded, and will be approved in {waiting_period} days if no objections are raised.",
0 commit comments