From 6c78cb69c77113545361dcbcad40fe136d982ae5 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 3 Apr 2021 14:42:07 -0400 Subject: [PATCH] feat(panettone): Send notifications when issues are reopened Send notifications both to IRC and email when issues are reopened after being closed Change-Id: I3a63419c6547ac28eeaafbe212a2a01a5fc2b5af Reviewed-on: https://cl.tvl.fyi/c/depot/+/2808 Tested-by: BuildkiteCI Reviewed-by: sterni Reviewed-by: tazjin --- web/panettone/src/panettone.lisp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp index 9a9aa9ce6..1067f4833 100644 --- a/web/panettone/src/panettone.lisp +++ b/web/panettone/src/panettone.lisp @@ -600,6 +600,21 @@ given subject an body (in a thread, to avoid blocking)" :method :post) (&path (id 'integer)) (model:set-issue-status id :open) + (let ((issue (model:get-issue id))) + (send-irc-notification + (format nil + "b/~A: \"~A\" reopened by ~A - https://b.tvl.fyi/issues/~A" + id + (subject issue) + (irc:noping (cn *user*)) + id) + :channel (or (uiop:getenvp "ISSUECHANNEL") + "##tvl-dev")) + (send-email-for-issue + id + :subject (format nil "~A reopened \"~A\"" + (dn *user*) + (subject issue)))) (hunchentoot:redirect (format nil "/issues/~A" id))) (defroute styles ("/main.css") ()