diff options
author | Christopher Baines <mail@cbaines.net> | 2022-10-25 20:28:15 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-10-25 20:28:15 +0100 |
commit | 886295cbd1dd00f5a5310f82140c6b12544356c2 (patch) | |
tree | e5ab1a14e3de16451dae701510a0bcbf04551691 /guix-qa-frontpage/patchwork.scm | |
parent | 00709634cf34eff33fe5675858305188248b1862 (diff) | |
download | qa-frontpage-886295cbd1dd00f5a5310f82140c6b12544356c2.tar qa-frontpage-886295cbd1dd00f5a5310f82140c6b12544356c2.tar.gz |
Get more data from mumi
Query the open status so that Patchwork isn't relied on for that. Also switch
to querying the tags in bulk.
Diffstat (limited to 'guix-qa-frontpage/patchwork.scm')
-rw-r--r-- | guix-qa-frontpage/patchwork.scm | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/guix-qa-frontpage/patchwork.scm b/guix-qa-frontpage/patchwork.scm index 69949e2..cd5bc26 100644 --- a/guix-qa-frontpage/patchwork.scm +++ b/guix-qa-frontpage/patchwork.scm @@ -9,6 +9,7 @@ #:use-module (web request) #:use-module (web response) #:use-module (guix-build-coordinator utils) + #:use-module (guix-qa-frontpage mumi) #:export (%patchwork-instance patchwork-patches @@ -150,11 +151,20 @@ ("patches" . (,patch)))))))) (patchwork-patches #:patchwork patchwork)) - (sort! - (hash-map->list cons result) - (lambda (a b) - (> (first a) - (first b)))))) + (let* ((data (hash-map->list cons result)) + (mumi-data (mumi-bulk-issues + (map first data)))) + (sort! + (filter-map (lambda (data mumi) + (if (assq-ref mumi 'open?) + `(,@data + (mumi . ,mumi)) + #f)) + data + mumi-data) + (lambda (a b) + (> (first a) + (first b))))))) (define (patchwork-patch-checks checks-url) ;; Patchwork uses http URIs, so convert here to avoid the redirect |