From 7ec6b1fdb3bd50ff28fec4e81d3f2e0296acef21 Mon Sep 17 00:00:00 2001 From: Ryoga Saito Date: Fri, 15 Dec 2023 23:05:26 +0900 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E5=B1=95=E9=96=8B=E4=B8=AD=E3=81=AE?= =?UTF-8?q?=E5=8D=98=E8=AA=9E=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bot/commands/redeploy.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bot/commands/redeploy.rs b/src/bot/commands/redeploy.rs index c375bc9..a7e298d 100644 --- a/src/bot/commands/redeploy.rs +++ b/src/bot/commands/redeploy.rs @@ -369,7 +369,13 @@ impl Bot { None => continue, }; - let name = &status.problem_code; + let name = status.problem_code.clone(); + let problem_name = self + .problems + .iter() + .find(|problem| problem.code == status.problem_code) + .map(|problem| format!("{}: {}", name, problem.name)) + .unwrap_or_else(|| name); let value = match status.last_redeploy_completed_at { Some(completed_at) => { @@ -390,7 +396,7 @@ impl Bot { }, }; - e.field(name, value, false); + e.field(problem_name, value, false); } e })