Jeremy White : Patches submitted by a maintainer need no reviewer.

Alexandre Julliard julliard at winehq.org
Wed Aug 10 03:29:59 CDT 2022


Module: tools
Branch: master
Commit: 30f1195e95d8125eec7d4157a83cc719e762fd28
URL:    https://gitlab.winehq.org/winehq/tools/-/commit/30f1195e95d8125eec7d4157a83cc719e762fd28

Author: Jeremy White <jwhite at codeweavers.com>
Date:   Tue Aug  9 16:27:32 2022 -0500

Patches submitted by a maintainer need no reviewer.

This is a revision of 34b1a84e, which had the intention
of excluding the author from any constructed maintainer list.

In the case of a maintainer submitting their own patches,
this would result in one of the involved people being assigned
to review the patch.  Henri being set up to review
Nikolay's work on d2d, for example.

However, this was a misinterpretation on my part of what
Alexandre had requested.  His thought had been that if Nikolay
is the sole maintainer, and submits only his own work, that no reviewer
need be assigned.

With this change, the focus of this patch is now to make
it so that an author of a merge request is *not* assigned
to review their own work.  If they are the sole
maintainer, then no one is assigned to review it.

---

 gitlab/gitlab-to-mail/assign.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gitlab/gitlab-to-mail/assign.py b/gitlab/gitlab-to-mail/assign.py
index 56167a37..513d07f1 100755
--- a/gitlab/gitlab-to-mail/assign.py
+++ b/gitlab/gitlab-to-mail/assign.py
@@ -24,11 +24,14 @@ def empty_record():
     }
     return copy.deepcopy(m)
 
-def add_but_exclude_author(out_ids, out_names, in_ids, in_names, author):
+def exclude_author(in_ids, in_names, author):
+    out_ids = []
+    out_names = []
     for i in range(len(in_ids)):
         if in_names[i] != author:
             out_ids.append(in_ids[i])
             out_names.append(in_names[i])
+    return out_ids, out_names
 
 class Assign:
     settings = None
@@ -112,11 +115,13 @@ class Assign:
             for glob in m['globs']:
                 for f in files:
                     if fnmatch.fnmatch(f, glob):
-                        add_but_exclude_author(maintainer_ids, maintainer_names, m['maintainer_ids'], m['maintainers'], author['name'])
-                        add_but_exclude_author(people_ids, people_names, m['people_ids'], m['people'], author['name'])
+                        maintainer_ids += m['maintainer_ids']
+                        maintainer_names += m['maintainers']
+                        people_ids += m['people_ids']
+                        people_names += m['people']
         if len(maintainer_ids) > 0:
-            return maintainer_ids, maintainer_names
-        return people_ids, people_names
+            return exclude_author(maintainer_ids, maintainer_names, author['name'])
+        return exclude_author(people_ids, people_names, author['name'])
 
     def get_assignees_from_commits(self, version):
         author_names = []




More information about the wine-cvs mailing list