From 0130a3bc3d16fb7674e3e1920c232b60f0c729bb Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 1 Feb 2019 12:44:40 +0100 Subject: messages: Add bugs-by-severity. * mumi/messages.scm (bugs-by-severity): New procedure. --- mumi/messages.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mumi/messages.scm b/mumi/messages.scm index 3cae441..63534a0 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -34,6 +34,7 @@ #:export (search-bugs fetch-bug recent-bugs + bugs-by-severity multipart-message? extract-attachment)) @@ -200,6 +201,16 @@ we have to do this in a very convoluted way." (ids (take unique (min amount (length unique))))) (status-with-cache ids))) +(define* (bugs-by-severity severity #:optional status) + "Return severe bugs." + (let* ((ids + (soap-invoke* (%config 'debbugs) + get-bugs + `((package . "guix") + (severity . ,severity) + ,@(if status `((status . ,status)) '()))))) + (status-with-cache ids))) + (define (ago unit amount) "Return the point in time that lies AMOUNT UNITs in the past." (let ((amount* (match unit -- cgit v1.2.3