Skip to contentSkip to conversation

get_maintainer: Add THE REST for sections with reviewers only

PATCH In review Anthony PERARD 3 participants 3 messages Oct 6, 2023 – Oct 10, 2023 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_maintainer: Add THE REST for sections with reviewers only

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.

---

Notes:
Soon, the RISCV section might be the first (I think) section without maintainer and without been nested in another section other than THE REST.

Tests by checking that the following comnands returns the expected emails. ./scripts/get_maintainer.pl -f tools/libs/Makefile ./scripts/get_maintainer.pl -f xen/arch/riscv/Makefile ./scripts/get_maintainer.pl -f xen/arch/arm/Makefile

An extra '--sections' argument list all sections, including THE REST.

 scripts/get_maintainer.pl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
scripts/get_maintainer.pl +8 -1
index cf629cdf3c..533d0df72a 100755
@@ -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;
             }
         }
Signature · 1 line
Anthony PERARD
#1 lore raw

Hi Anthony,

Quoted 10 lines · Anthony PERARD

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.

Kind regards,
Henry

Quoted 41 lines

---

Notes:
Soon, the RISCV section might be the first (I think) section without maintainer and without been nested in another section other than THE REST.

Tests by checking that the following comnands returns the expected emails. ./scripts/get_maintainer.pl -f tools/libs/Makefile ./scripts/get_maintainer.pl -f xen/arch/riscv/Makefile ./scripts/get_maintainer.pl -f xen/arch/arm/Makefile

An extra '--sections' argument list all sections, including THE REST.

scripts/get_maintainer.pl | 9 ++++++++-

1 file changed, 8 insertions(+), 1 deletion(-)
scripts/get_maintainer.pl +8 -1
index cf629cdf3c..533d0df72a 100755
@@ -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;
            }
        }
Signature · 1 line
Anthony PERARD
Reviewed-by on v1 1/1
#2 lore raw
In reply to Anthony PERARD

Hi Anthony,

Quoted 8 lines · Anthony PERARD

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.

Cheers,

Signature · 1 line
Julien Grall