about summary refs log tree commit diff
path: root/web/panettone
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-11-22T19·05-0500
committerglittershark <grfn@gws.fyi>2020-11-22T21·59+0000
commit92a1f72f410c8ac46d3c4f9913a8b2d4316f7914 (patch)
treea9b4b19d5e2e6b43762c6d46bb323ea534c29d2e /web/panettone
parent96eac23250d7f2c68ba384c08a02c17944b6e833 (diff)
feat(panettone): Send notifications when issues are closed r/1903
Send an irc notification when issues are marked closed, in a similar
format to the notifications sent when new issues are created.

Change-Id: I2fdde33f0dedc223a5c2265eed778161938f8e9a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2126
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'web/panettone')
-rw-r--r--web/panettone/src/panettone.lisp19
1 files changed, 14 insertions, 5 deletions
diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp
index 49492363ffdf..bcf215d15828 100644
--- a/web/panettone/src/panettone.lisp
+++ b/web/panettone/src/panettone.lisp
@@ -454,11 +454,13 @@
               (model:create-issue :subject subject
                                   :body body
                                   :author-dn (dn *user*))))
-        (send-irc-notification (format nil "b/~A: \"~A\" opened by ~A - https://b.tvl.fyi/issues/~A"
-                                       (id issue) subject (cn *user*)
-                                       (id issue))
-                               :channel (or (uiop:getenvp "ISSUECHANNEL")
-                                            "##tvl-dev"))
+        (send-irc-notification
+         (format nil
+                 "b/~A: \"~A\" opened by ~A - https://b.tvl.fyi/issues/~A"
+                 (id issue) subject (cn *user*)
+                 (id issue))
+         :channel (or (uiop:getenvp "ISSUECHANNEL")
+                      "##tvl-dev"))
         (hunchentoot:redirect "/"))))
 
 (defroute show-issue
@@ -515,6 +517,13 @@
                          :method :post)
     (&path (id 'integer))
   (model:set-issue-status id :closed)
+  (let ((issue (model:get-issue id)))
+    (send-irc-notification
+     (format nil
+             "b/~A: \"~A\" closed by ~A - https://b.tvl.fyi/issues/~A"
+             id (subject issue) (cn *user*) id)
+     :channel (or (uiop:getenvp "ISSUECHANNEL")
+                  "##tvl-dev")))
   (hunchentoot:redirect (format nil "/issues/~A" id)))
 
 (defroute open-issue