dave2wave commented on code in PR #1568:
URL: 
https://github.com/apache/tooling-trusted-releases/pull/1568#discussion_r3935840065


##########
atr/util.py:
##########
@@ -183,6 +183,8 @@
     }
 )
 LISTS_APACHE_TIMEOUT: Final[aiohttp.ClientTimeout] = 
aiohttp.ClientTimeout(total=30, connect=10)
+LISTS_PREFERENCES_URL: Final[str] = 
"https://lists.apache.org/api/preferences.json";

Review Comment:
   New mailing lists are created more frequently than the server will be 
restarted. A discussion with the developers is needed for the best method of 
managing this proposed cache.



##########
atr/util.py:
##########
@@ -645,12 +647,45 @@ def concern_groups(info: "datatypes.PathInfo | None") -> 
list[ConcernGroup]:
     ]
 
 
+def committee_user_list_name(committee_key: str) -> str:
+    """Derive whether a committee uses 'users' or 'user' as its public user 
list name."""
+    if _MAILING_LISTS_CACHE is not None:
+        domain = f"{committee_key}.apache.org"
+        lists = _MAILING_LISTS_CACHE.get(domain)
+        if lists is not None:
+            if "users" in lists:
+                return "users"
+            if "user" in lists:
+                return "user"
+    return "users" if (committee_key in USERS_LIST_COMMITTEES) else "user"

Review Comment:
   Many committees have no `user@` and no `users@` mailing list.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to