From: Mathieu Othacehe <othacehe@gnu.org>
To: 47929@debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#47929] [PATCH 4/5] scripts: weather: Add packages dashboard support.
Date: Wed, 21 Apr 2021 14:21:07 +0200 [thread overview]
Message-ID: <20210421122108.2344-4-othacehe@gnu.org> (raw)
In-Reply-To: <20210421122108.2344-1-othacehe@gnu.org>
* guix/scripts/weather.scm (display-dashboard-url): New procedure.
(guix-weather): Call it.
---
guix/scripts/weather.scm | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 5164fe0494..be0b2e3509 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -499,6 +499,17 @@ SERVER. Display information for packages with at least THRESHOLD dependents."
#f
systems))))
+(define (display-dashboard-url server packages)
+ "Display a link to the dashboard for PACKAGES on the given CI SERVER."
+ (let* ((id (dashboard-register server packages))
+ (url (and id (dashboard-url server id))))
+ (when url
+ (format #t "~%")
+ (format #t (G_ "The packages dashboard is available ~a.~%")
+ (if (supports-hyperlinks?)
+ (hyperlink url (G_ "here"))
+ (format #f "here: ~a" url))))))
+
\f
;;;
;;; Entry point.
@@ -554,15 +565,18 @@ SERVER. Display information for packages with at least THRESHOLD dependents."
(report-server-coverage server items
#:display-missing?
(assoc-ref opts 'display-missing?)))
- (match (assoc-ref opts 'coverage)
- (#f #f)
- (threshold
- ;; PACKAGES may include non-package objects coming from a
- ;; manifest. Filter them out.
- (report-package-coverage server
- (filter package? packages)
- systems
- #:threshold threshold)))
+
+ ;; PACKAGES may include non-package objects coming from a
+ ;; manifest. Filter them out.
+ (let ((packages (filter package? packages)))
+ (match (assoc-ref opts 'coverage)
+ (#f #f)
+ (threshold
+ (report-package-coverage server
+ packages
+ systems
+ #:threshold threshold)))
+ (display-dashboard-url server packages))
(= 1 coverage))
urls))))))
--
2.31.1
next prev parent reply other threads:[~2021-04-21 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 12:16 [bug#47929] [PATCH 0/5] Add manifest support to channel-with-substitutes-available Mathieu Othacehe
2021-04-21 12:21 ` [bug#47929] [PATCH 1/5] ci: " Mathieu Othacehe
2021-04-21 12:21 ` [bug#47929] [PATCH 2/5] scripts: pull: Load (gnu packages) module Mathieu Othacehe
2021-04-21 12:21 ` [bug#47929] [PATCH 3/5] ci: Add dashboard procedures Mathieu Othacehe
2021-04-21 12:21 ` Mathieu Othacehe [this message]
2021-04-21 12:21 ` [bug#47929] [PATCH 5/5] ui: Disable hyperlink support inside screen Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210421122108.2344-4-othacehe@gnu.org \
--to=othacehe@gnu.org \
--cc=47929@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.