]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
get_maintainer: Add THE REST for sections with reviewers only
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 17 Oct 2023 07:53:34 +0000 (09:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Oct 2023 07:53:34 +0000 (09:53 +0200)
Sometime, a contributer would like to be CCed on part of the changes,
and it could happen that we end-up with a section that doesn't have
any maintainer, but a Ack from a maintainer would still be needed.

Rework get_maintainer so if there's no maintainers beside THE REST, it
doesn't drop THE REST emails.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
scripts/get_maintainer.pl

index cf629cdf3c44e4abe67214378c49a3a9d858d9b5..533d0df72ac174d69f6066449df9d6d1813466e1 100755 (executable)
@@ -732,8 +732,15 @@ sub get_maintainers {
         my @email_new;
         my $do_replace = 0;
         foreach my $email (@email_to) {
-            if ($email->[1] ne 'supporter:THE REST') {
+            # Replace @email_to list with a list which drop "THE REST" if
+            # there's a role other than "reviewer", that is if there's a
+            # maintainer/supporter in a section other than THE REST.
+            if ($email->[1] ne 'supporter:THE REST' and $email->[1] ne 'reviewer') {
                 $do_replace = 1;
+            }
+            # Prepare a new list without "THE REST", to be used if $do_replace
+            # is true.
+            if ($email->[1] ne 'supporter:THE REST') {
                 push @email_new, $email;
             }
         }