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 GDrXEmFXRWSpMQEASxT56A (envelope-from ) for ; Sun, 23 Apr 2023 18:05:53 +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 COrOEWFXRWR2ggEAG6o9tA (envelope-from ) for ; Sun, 23 Apr 2023 18:05:53 +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 E0FA23E845 for ; Sun, 23 Apr 2023 18:05:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqcDZ-00068j-DU; Sun, 23 Apr 2023 12:05:39 -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 1pqcD1-00061w-VP for bug-guix@gnu.org; Sun, 23 Apr 2023 12:05:07 -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 1pqcD1-0002M1-0H for bug-guix@gnu.org; Sun, 23 Apr 2023 12:05:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pqcD0-0004i7-S9 for bug-guix@gnu.org; Sun, 23 Apr 2023 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58813: [PATCH 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: Sun, 23 Apr 2023 16:05:02 +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.168226587618019 (code B ref 58813); Sun, 23 Apr 2023 16:05:02 +0000 Received: (at 58813) by debbugs.gnu.org; 23 Apr 2023 16:04:36 +0000 Received: from localhost ([127.0.0.1]:46811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqcCZ-0004gQ-GV for submit@debbugs.gnu.org; Sun, 23 Apr 2023 12:04:35 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:61707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqcCW-0004fp-Kx for 58813@debbugs.gnu.org; Sun, 23 Apr 2023 12:04:33 -0400 Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-3ef657f5702so15238961cf.3 for <58813@debbugs.gnu.org>; Sun, 23 Apr 2023 09:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682265867; x=1684857867; 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=oGVZ2/DO40otP+Cz7ecHht/mOW+4xy3r2V357XEY2qEwePChscuUJWeld/aSeZJ4tv LCPA9RFowq5S10C/QSS6eOednnEb3OrVCkdlXVLOwy0VmmGqYYtbYiZnn7v9rYASmjQI 33WAVRlF2inGhJC+arlmaSiBUpZV55i/ZONvHVzyCPsAcdMRPaJ5+ji/RzKGAJ/o/74N H1BKiiFPVhaxV1UaTr3Nay5ZjU43F0lxkn/nmAaN8QH/NFHpSfgw+ghBKwIuTq7KuDfM rLru4AT4kghSirZX0HzOZsg0DtJ7Vlp/eDVjosV8dH/Mpw8MI27uH8cb+zkGaB46dVV8 HiWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682265867; x=1684857867; 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=I+ipvZruZp+PnCC/L7bJNvVM3ecNKXTp24nUq7Rx7hRFfVA2e1eZAAaqGkqhrsh8cX Jsb4nhu6g4dGOO0elqGEP3vDrBxL55sTfvlKyPitMSgrJWnso4K8z3DlLMBscWwg+8ta IlTgn+Otj/z1cdHAzuywnvdGkXOCuOdu2yx+SuLWPcZzBmVhwTa2xFlEEWAc9OYKQTpV hd71c+cvooxlSGCP6vcs0BPbqy0mqgkLUg1fGdo9bGa1ozRLV6P+FChOvJQh2SKyzH99 F6QEIudSti9n/AXQR42pHP8CQ1FDNzEF+qiu3oAJQ0fNKTuk10jGWiEP6nnjF0ORGwhA MmZw== X-Gm-Message-State: AAQBX9dA1yDhQXGz2ioSccgDFE+/2NLWuN3CP6WrEvYLBn8kB1R/GkS5 OSWVkygh1wFOPlYTnvYAMqOc/1ey/yewQw== X-Google-Smtp-Source: AKy350aReC9DUriTIefvR4W8U1DT1ofGKSCsK7vcnEh8dj/ywrmGq6p6FmdNVZnRYeeMLAvcp4yPNw== X-Received: by 2002:a05:622a:184:b0:3ef:4a6c:f9d2 with SMTP id s4-20020a05622a018400b003ef4a6cf9d2mr18545831qtw.60.1682265866981; Sun, 23 Apr 2023 09:04:26 -0700 (PDT) Received: from localhost.localdomain (dsl-141-20.b2b2c.ca. [66.158.141.20]) by smtp.gmail.com with ESMTPSA id d13-20020a05622a15cd00b003ef48392649sm2957469qty.4.2023.04.23.09.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 09:04:26 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 23 Apr 2023 12:04:12 -0400 Message-Id: <2c8e1e7fe43d6460f3cc4c2b77d649e109030eb3.1682265703.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <878rg4snrf.fsf@gmail.com> References: <878rg4snrf.fsf@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=1682265952; a=rsa-sha256; cv=none; b=EDd01Oy66mul83Zjg2tSPN46SEC2UcodobRkkhVhZtmeEc0DAfCEtlt1HKwpV4/BLNLx4N SuRwj7PGfOJztKAFIgazzwRK5Pj8sdXJ/3E+u9+KrT6Z2bDRNBFTrDb8211PBAVi4o+SVk dEBMYk1EqrBTHACF0u1Ephz/NhuqYI/ADYbFu9jLQAslY8yuZR4XqZnu/AzVOsH+yCw79Y /t/6zGeJImi/3nKXB6oOi3bOBlEp6oL9rfsIquktUrb+ib44rYLPFmsi8//rrUl7WPIPbW RC1d80NZ6UB7kjsVayqkKQLMUEODUeujWvpwP3p39jHlVqae1dSnh8syt8eZzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20221208 header.b="oGVZ2/DO"; 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=1682265952; 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=HdP83FCkjIQklQdr43Wo0XTAXMtQqT1gqy4uCJeh2RXb8PmIS+p+b83uaSkGrr558NL4hx tn+Ub9j+GRQR67n69gSsheEX/uI5ldY6NPN1vZ/Em/tSKcoyXMQ35DqBSG7SZbvTymgkRZ fmFOAp9LxaVA/WyQ2isA/CFyVy7vx4kgNSyUM3eJSPZANqOIMJQG6JoQ9DvqWuTkYF+Fsc H+//BAqGDSbaT992ehIDARIxpsKfS0VF+vBaXKxGGKmmkxMXAX7136dL1wy5qp6azxIsIV orkt2hWGJOkTO4Ii2FcA1wQ5lA/42X6Cluh+sYZm5O2ybg4NFDnIuKbOoRskOA== X-Migadu-Spam-Score: -0.61 X-Spam-Score: -0.61 X-Migadu-Queue-Id: E0FA23E845 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="oGVZ2/DO"; 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: 4XKefuMF6o/n * 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