From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uGRlBd/pRWQZDgEASxT56A (envelope-from ) for ; Mon, 24 Apr 2023 04:30:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +Ih/BN/pRWSmUwAAG6o9tA (envelope-from ) for ; Mon, 24 Apr 2023 04:30:55 +0200 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 9AB868DA5 for ; Mon, 24 Apr 2023 04:30:53 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqlxz-0000Zo-0b; Sun, 23 Apr 2023 22:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqlxr-0000Yd-Rm for bug-guix@gnu.org; Sun, 23 Apr 2023 22:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqlxr-0000xb-Hu for bug-guix@gnu.org; Sun, 23 Apr 2023 22:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pqlxr-0002PF-Cs for bug-guix@gnu.org; Sun, 23 Apr 2023 22:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58813: [PATCH v2 2/5] teams: Add 'cc-members-header-cmd' action. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 24 Apr 2023 02:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58813 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 58813@debbugs.gnu.org Cc: ludo@gnu.org, liliana.prikler@gmail.com, Maxim Cournoyer , zimon.toutoune@gmail.com Received: via spool by 58813-submit@debbugs.gnu.org id=B58813.16823033879164 (code B ref 58813); Mon, 24 Apr 2023 02:30:03 +0000 Received: (at 58813) by debbugs.gnu.org; 24 Apr 2023 02:29:47 +0000 Received: from localhost ([127.0.0.1]:47256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqlxa-0002Ne-FY for submit@debbugs.gnu.org; Sun, 23 Apr 2023 22:29:46 -0400 Received: from mail-qv1-f46.google.com ([209.85.219.46]:44370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqlxV-0002Mn-1F for 58813@debbugs.gnu.org; Sun, 23 Apr 2023 22:29:41 -0400 Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-5ef6197ea51so17513516d6.1 for <58813@debbugs.gnu.org>; Sun, 23 Apr 2023 19:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682303375; x=1684895375; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cIhYiIUaQDph7ac25C7KgmtaG8U7VaxgDQchW0D5RXE=; b=UnG/FXER1zY122WBUjVNtzUH6SbKAtPkAQKj1FOtLSxH4dKIXQpMrGXGulkYTs/CWU PSngd2Tv1QXJAWCDse4bulYFLTcO9pr+hURikslzAWh1QVK0bW6SBLn5qQG0qyhvNsBK H4FoA3aimsBv6FPRwI0LNHTcHth+By802ylmBy09t2HnD38+70nvPrRiMHA8DqN06tTW zbdbQ/TfRWhfg64yLTGnqS/Kzy1dZmbYHRiinutvCtyuK9ajAYhHQUuOBwOKfafhWMEN zOS7+/jZQaC3SeAB9o1MSbmRvIes+E2hPi6mke4dgvAnTAgGS8pm2Fj9DiERpkVOxImj Xv8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682303375; x=1684895375; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cIhYiIUaQDph7ac25C7KgmtaG8U7VaxgDQchW0D5RXE=; b=geNzEKdtZbkvHf2DZ5JAPSjzbzDFJy2ZXpggpzFluQm/rqq6WpdDA5yaTkPCqMs7Tv CVy/puPAoKP0qErWvekomctBR6WTOYG/G11YbYtfnUTF+xtEZXb++H6DzxSGlFB0TSEt FLWl+bNzdkxaCt91JrEsfSjlRhSdjbWx6ht/iuAoipvtKdMqmYpJdNCFwvaFuljIneGv U1Y2ZlFzrX8xnKdhpWZm8gl5u9y+5J2ZlN6v++cazmKpnZb3aGtd21SCQQf7K/o/fXKu 7YzO4S41P2Qp8Ya3/+uMRPisESM0oeT1XR0j+4/00MiBxKwoxxyJCv4+XSk0Y5+hl3IO +LZw== X-Gm-Message-State: AAQBX9eEf/+lr8pJx/l8elaMwJksUJLZwmvgjegM4lxRktOWLjV5VU4J Bu4R1iJwsMFo94iWQFQN/J4SFuXX2yU= X-Google-Smtp-Source: AKy350Yrmd1hEHxtB2XhAyEClmnlnLC5lbJM5Kaz9qATD8WIRgh2m2j5ewVQFbntpoNW1spgXZZCIw== X-Received: by 2002:a05:6214:2305:b0:5ef:9b22:dc88 with SMTP id gc5-20020a056214230500b005ef9b22dc88mr22119190qvb.0.1682303375397; Sun, 23 Apr 2023 19:29:35 -0700 (PDT) Received: from localhost.localdomain (dsl-141-20.b2b2c.ca. [66.158.141.20]) by smtp.gmail.com with ESMTPSA id a4-20020a0ce384000000b005ef658e65b8sm2986472qvl.121.2023.04.23.19.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 19:29:35 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 23 Apr 2023 22:29:24 -0400 Message-Id: <2c8e1e7fe43d6460f3cc4c2b77d649e109030eb3.1682303142.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <5b9af4fa77a89c6a4b169dc464f414b1a4166d60.camel@gmail.com> References: <5b9af4fa77a89c6a4b169dc464f414b1a4166d60.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682303454; a=rsa-sha256; cv=none; b=Ybx0QGUlPIFIK/fuvJ4VMoIRjxpLWk+cdzv8WhOPDntrjR/biuU5LhRGhPu59Hg+sbuvHO njgdoQpFJvIZfNccwl1e/JAov4e/JYs+NQ3z+mYL7YGY0ljCqgEBhnqCL6ypV3t8jQzFiW 3oAvu1SLdVv0pGSR35ZG2qv+GERY4GA1j9pTRXSrGjrYWbJ3aKACwG5BlwwJqcbpaAihyY pw4fOO4yzPqmtkrIt2834hAMS1g/pZ5cCYiwjRtw7fXdABOEDaeamu95cx+SQxSva7e5EW CPljcbQaduDdyuGCowwaAnJqWXx5ixVYobQswND/KCjVCwAyLZ2kZ9x/8NW8+A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20221208 header.b="UnG/FXER"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682303454; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=FnSgrBvAv02ZZlSoh2YZodJpjNuCDokqcMRM0AVErNc=; b=ivFpEv/C/0Nu0424/KxlJaOOiHn6pqV7pljWDiGb6QPN4YZDcER/WS2Ob+DJ3S/s9YRA/f R6+vByqcjQlwPXzYGRr5uZoDCmEZyr2TtU+yxHCbxEchf16+Tk6Hpu+QOmS18vnXF4rysK JDLrrJtBE16giR9D7fzFw2lmv17yrxj1qKtpeqkq+M02BMsnuhj0G2duLtyKcyt+xjmNmu L6TFtOcV2rtTxFPNC9s2+7+gwbWZPV/ASBeFI+mE0ZfOnvZ9W5/lXQ6E05A3hB8zeyr8yA GSAMkkqMDo6qClGzXqKiRCz58CDeS5eDKVehU/cfEmUz9EP6qe0lJbbFP18BZw== X-Migadu-Spam-Score: -0.31 X-Spam-Score: -0.31 X-Migadu-Queue-Id: 9AB868DA5 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20221208 header.b="UnG/FXER"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-TUID: rnl4iRJbK44y * etc/teams.scm.in (patch->teams): New procedure. (main): Use it. Add a new "cc-members-header-cmd" command; document it. --- etc/teams.scm.in | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/etc/teams.scm.in b/etc/teams.scm.in index 37a3c8e191..408db8b7d5 100644 --- a/etc/teams.scm.in +++ b/etc/teams.scm.in @@ -5,7 +5,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022, 2023 Ricardo Wurmus ;;; Copyright © 2022 Mathieu Othacehe -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -696,6 +696,12 @@ (define (git-patch->revisions file) (rev-start (string-append rev-end "^"))) (list rev-start rev-end))) +(define (patch->teams patch-file) + "Return the name of the teams in scope for the changes in PATCH-FILE." + (map (compose symbol->string team-id) + (find-team-by-scope (apply diff-revisions + (git-patch->revisions patch-file))))) + (define (main . args) (match args @@ -708,11 +714,13 @@ (define (main . args) (("cc-members" rev-start rev-end) (apply cc (find-team-by-scope (diff-revisions rev-start rev-end)))) + (("cc-members-header-cmd" patch-file) + (for-each (lambda (team-name) + (list-members (find-team team-name) (current-output-port) + "X-Debbugs-Cc: ")) + (patch->teams patch-file))) (("get-maintainer" patch-file) - (apply main "list-members" - (map (compose symbol->string team-id) - (find-team-by-scope (apply diff-revisions - (git-patch->revisions patch-file)))))) + (apply main "list-members" (patch->teams patch-file))) (("list-teams" . args) (list-teams)) (("list-members" . team-names) @@ -729,6 +737,8 @@ (define (main . args) get git send-email flags for cc-ing cc-members | patch cc teams related to files changed between revisions or in a patch file + cc-members-header-cmd + cc-members variant for use with 'git send-email --header-cmd' list-teams list teams and their members list-members -- 2.39.2