Jeremy White : gitlab: Improve assignment diagnostics slightly.

Alexandre Julliard julliard at winehq.org
Tue Jul 19 03:17:01 CDT 2022


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

Author: Jeremy White <jwhite at codeweavers.com>
Date:   Mon Jul 18 15:33:59 2022 -0500

gitlab: Improve assignment diagnostics slightly.

Log the reviewers before we post.  Hopefully will
help identify issues with post failures.

Log a unique set of reviewer names.

---

 gitlab/gitlab-to-mail/assign.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gitlab/gitlab-to-mail/assign.py b/gitlab/gitlab-to-mail/assign.py
index 9b6acb69..6b35f577 100755
--- a/gitlab/gitlab-to-mail/assign.py
+++ b/gitlab/gitlab-to-mail/assign.py
@@ -117,12 +117,10 @@ def assign_reviewers(mr_iid, version, maintainers_map, update_db):
             paths.append(d['new_path'])
     ids, names = get_assignees(maintainers_map, paths)
     if len(ids) > 0:
+        unique_names = list(set(names))
+        print(f"Asking {unique_names} to review MR {mr_iid}")
         if update_db:
-            # set() prunes dupes, list() makes it json transmittable again
             post_reviewers(mr_iid, list(set(ids)))
-            print(f"Asking {names} to review MR {mr_iid}")
-        else:
-            print("Debug: would set reviewers for {} to {}".format(mr_iid, set(names)))
     else:
         print(f"No suitable reviewers found for MR {mr_iid}")
 




More information about the wine-cvs mailing list