unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#58573] [PATCH 0/1] Add QA status badge to mumi issue page.
@ 2022-10-16 19:31 Arun Isaac
  2022-10-16 19:33 ` [bug#58573] [PATCH] Add QA status badge to " Arun Isaac
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Isaac @ 2022-10-16 19:31 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: arunisaac, mail, 58573

Hi Ricardo,

Chris (CCed) has recently set up a QA feature that allows patch
contributors and reviewers to quickly check the build status of
contributed patches across different architectures. qa.guix.gnu.org
provides this status indication as an SVG badge that can be embedded
into a mumi issue page. This patch does so.

Regards,
Arun

Arun Isaac (1):
  Add QA status badge to issue page.

 mumi/config.scm.in     |  4 +++-
 mumi/web/view/html.scm | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

-- 
2.37.3





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#58573] [PATCH] Add QA status badge to issue page.
  2022-10-16 19:31 [bug#58573] [PATCH 0/1] Add QA status badge to mumi issue page Arun Isaac
@ 2022-10-16 19:33 ` Arun Isaac
  2022-10-16 20:05   ` bug#58573: " Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Isaac @ 2022-10-16 19:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 58573, Arun Isaac, Christopher Baines

* mumi/config.scm.in (%config): Add qa-scheme and qa-host
configuration parameters.
* mumi/web/view/html.scm: Import (web uri).
(build-uri-path): New function.
(issue-page): Add QA status badge.
---
 mumi/config.scm.in     |  4 +++-
 mumi/web/view/html.scm | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/mumi/config.scm.in b/mumi/config.scm.in
index 66ad924..ed9330a 100644
--- a/mumi/config.scm.in
+++ b/mumi/config.scm.in
@@ -78,6 +78,8 @@
            (submission-bug-email-address . "bug-guix@gnu.org")
            (lists       . ("guix-patches@gnu.org" "bug-guix@gnu.org"))
            (packages    . ("guix-patches" "guix"))
-           (debbugs-domain . "debbugs.gnu.org"))))
+           (debbugs-domain . "debbugs.gnu.org")
+           (qa-scheme   . https)
+           (qa-host     . "qa.guix.gnu.org"))))
     (lambda (key)
       (assoc-ref config key))))
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm
index 171fbf9..7fd85bc 100644
--- a/mumi/web/view/html.scm
+++ b/mumi/web/view/html.scm
@@ -26,6 +26,7 @@
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-19)
+  #:use-module (web uri)
   #:export (index
             help
             unknown
@@ -355,6 +356,10 @@ failed to process associated messages.")
           ,message
           (p (a (@ (href "/")) "Try something else?"))))))
 
+(define (build-uri-path . parts)
+  "Encode PARTS and join them together into an absolute URI path."
+  (string-append "/" (encode-and-join-uri-path parts)))
+
 (define* (issue-page bug #:optional flash-message)
   "Render the conversation for the given BUG."
   (define id (bug-num bug))
@@ -403,6 +408,18 @@ failed to process associated messages.")
                            ;; non-ASCII characters.
                            (sender-name (first messages))
                            ".")
+           (div
+            (a (@ (href ,(uri->string
+                          (build-uri (%config 'qa-scheme)
+                                     #:host (%config 'qa-host)
+                                     #:path (build-uri-path "issue"
+                                                            (number->string id))))))
+               (img (@ (src ,(uri->string
+                              (build-uri (%config 'qa-scheme)
+                                         #:host (%config 'qa-host)
+                                         #:path (build-uri-path "issue"
+                                                                (number->string id)
+                                                                "status-badge-medium.svg"))))))))
            (details
             (@ (class "info"))
             (summary "Details")
-- 
2.37.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#58573: [PATCH] Add QA status badge to issue page.
  2022-10-16 19:33 ` [bug#58573] [PATCH] Add QA status badge to " Arun Isaac
@ 2022-10-16 20:05   ` Ricardo Wurmus
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2022-10-16 20:05 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 58573-done, Christopher Baines


Arun Isaac <arunisaac@systemreboot.net> writes:

> * mumi/config.scm.in (%config): Add qa-scheme and qa-host
> configuration parameters.
> * mumi/web/view/html.scm: Import (web uri).
> (build-uri-path): New function.
> (issue-page): Add QA status badge.

Applied, thank you!

-- 
Ricardo




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-16 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-16 19:31 [bug#58573] [PATCH 0/1] Add QA status badge to mumi issue page Arun Isaac
2022-10-16 19:33 ` [bug#58573] [PATCH] Add QA status badge to " Arun Isaac
2022-10-16 20:05   ` bug#58573: " Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).