summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-04-22 23:35:59 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-05-01 12:39:11 -0400
commit0eddeb9896985e4139f412e41991ac5633a104ba (patch)
tree4c466b6c6f8120b202ae27b1d4d7932076b6b821 /etc
parenta9cbf8b3798552d202d3327537a920beead53747 (diff)
teams: Add 'cc-members-header-cmd' action.
* etc/teams.scm.in (patch->teams): New procedure. (main): Use it. Add a new "cc-members-header-cmd" command; document it.
Diffstat (limited to 'etc')
-rw-r--r--etc/teams.scm.in20
1 files 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 <rekado@elephly.net>
;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
-;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -696,6 +696,12 @@ and REV-END, two git revision strings."
(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 @@ and REV-END, two git revision strings."
(("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 @@ Commands:
get git send-email flags for cc-ing <team-name>
cc-members <start> <end> | patch
cc teams related to files changed between revisions or in a patch file
+ cc-members-header-cmd <patch>
+ cc-members variant for use with 'git send-email --header-cmd'
list-teams
list teams and their members
list-members <team-name>