From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SPClHPcYgGBxJwEAgWs5BA (envelope-from ) for ; Wed, 21 Apr 2021 14:22:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wDpbGPcYgGBMNgAAB5/wlQ (envelope-from ) for ; Wed, 21 Apr 2021 12:22:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2F34214D4D for ; Wed, 21 Apr 2021 14:22:15 +0200 (CEST) Received: from localhost ([::1]:41536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZBrx-0002bE-Uj for larch@yhetil.org; Wed, 21 Apr 2021 08:22:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZBrn-0002XP-Qn for guix-patches@gnu.org; Wed, 21 Apr 2021 08:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZBrn-0007BN-JD for guix-patches@gnu.org; Wed, 21 Apr 2021 08:22:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZBrn-0005aR-Fr for guix-patches@gnu.org; Wed, 21 Apr 2021 08:22:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47929] [PATCH 4/5] scripts: weather: Add packages dashboard support. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Apr 2021 12:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47929 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47929@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 47929-submit@debbugs.gnu.org id=B47929.161900769621411 (code B ref 47929); Wed, 21 Apr 2021 12:22:03 +0000 Received: (at 47929) by debbugs.gnu.org; 21 Apr 2021 12:21:36 +0000 Received: from localhost ([127.0.0.1]:57120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZBrL-0005ZB-He for submit@debbugs.gnu.org; Wed, 21 Apr 2021 08:21:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZBrH-0005YI-Ow for 47929@debbugs.gnu.org; Wed, 21 Apr 2021 08:21:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54766) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZBrC-0006nq-Jr for 47929@debbugs.gnu.org; Wed, 21 Apr 2021 08:21:26 -0400 Received: from [2a01:e0a:19b:d9a0:9576:8bbf:4795:82ee] (port=38154 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lZBr9-0003pa-Vd; Wed, 21 Apr 2021 08:21:24 -0400 From: Mathieu Othacehe Date: Wed, 21 Apr 2021 14:21:07 +0200 Message-Id: <20210421122108.2344-4-othacehe@gnu.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421122108.2344-1-othacehe@gnu.org> References: <20210421122108.2344-1-othacehe@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619007735; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=OoVsYDDaUs7hG1X/A8hXSz4yg1Hnr/8Ud2cc9VEYtj0=; b=FK9JKnDHlTptBs9SuZfTMJOrWr/81N0OruwM5CCrwl05Mhz/7KJ4XeEL8Sc+MBRZHbSBVj 1MuKXjpZx4brzwBG49byUzQJD/NDmzCbbKkBJLYXhi3ZBbZ3pJCYvg+7+fJ06h+RpIPg3N b4QRk+cg/d0BOUHdI9dpQiF6kEN8jk4HyQomq0Kb3QW6tm1tQlVkL4qcAzNd4OTpnQoXeb jlTQv8vRYyrqmoCLHBw0OStNfEYG3IySqjeVLeq8udI7eLORrd0FXK7qMiOMBzBI2cZODS QuQF9NghWEJ5DGL93RApadrDR90MSNwLkT3xjIVX7FjJKNI2h3nZx2L5FCv+PQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619007735; a=rsa-sha256; cv=none; b=P9Vdr4pWnA4LQx6izCwmQKz/Nbcyr/9Q8wGzhhO66zKsiYt94gPEToZ0huAxy+N6O4A+9Q dzkeKIHE2pr2Go7KarXF7jYj9BG4Bq5vLWqlRKhl8N3KCsXCvelQsSSd99f13vPcx5wpbU gqjt7lZJZE2/OL2ykT3nUtZeogyT7SrlQGheqBhuWwVwmgJ1G6XB8s1I53Y8ZZM5Nghufr H2PfMpvub4qgMHrrJEwnivrEbQc6up7kbtxCzQI3PNvCSUJBKgJYDsaNx13w1ImObJ8jm0 4BN0ahjTZGf1VNNw4tBoOtOyM+GwjhBhWiODl06ca7t5vYhxmdYO+VpYFvlhSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2F34214D4D X-Spam-Score: 2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: EpyR/yS0k5aL * 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)))))) + ;;; ;;; 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