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 <sternenseemann@systemli.org>
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Griffin Smith 2021-04-03 14:42:07 -04:00 committed by glittershark
parent 606d2af2da
commit 6c78cb69c7

View file

@ -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") ()