You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2025/07/01 14:36:51 UTC
(tooling-trusted-release) branch main updated: Accept email addresses as UIDs
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new db47ecb Accept email addresses as UIDs
db47ecb is described below
commit db47ecb636e7b4dd7d6e0555267d28ef45c59cba
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Tue Jul 1 15:36:31 2025 +0100
Accept email addresses as UIDs
---
atr/routes/vote.py | 7 +++++--
atr/util.py | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/atr/routes/vote.py b/atr/routes/vote.py
index a79470e..3aa5fd4 100644
--- a/atr/routes/vote.py
+++ b/atr/routes/vote.py
@@ -48,6 +48,7 @@ _THREAD_URLS_FOR_DEVELOPMENT: Final[dict[str, str]] = {
"CANVKqzfLYj6TAVP_Sfsy5vFbreyhKskpRY-vs=F7aLed+rL+uA@mail.gmail.com": "https://lists.apache.org/thread/oy969lhh6wlzd51ovckn8fly9rvpopwh",
"CAH4123ZwGtkwszhEU7qnMByLa-yvyKz2W+DjH_UChPMuzaa54g@mail.gmail.com": "https://lists.apache.org/thread/7111mqyc25sfqxm6bf4ynwhs0bk0r4ys",
"CADL1oArKFcXvNb1MJfjN=10-yRfKxgpLTRUrdMM1R7ygaTkdYQ@mail.gmail.com": "https://lists.apache.org/thread/d7119h2qm7jrd5zsbp8ghkk0lpvnnxnw",
+ "a1507118-88b1-4b7b-923e-7f2b5330fc01@apache.org": "https://lists.apache.org/thread/gzjd2jv7yod5sk5rgdf4x33g5l3fdf5o",
}
@@ -510,7 +511,8 @@ def _tabulate_vote_outcome_format(
outcome_passed = (binding_plus_one >= 3) and (binding_plus_one > binding_minus_one)
if not outcome_passed:
if (duration_hours_remaining is not None) and (duration_hours_remaining > 0):
- msg = f"The vote is still open for {duration_hours_remaining} hours, but the vote would fail if closed now."
+ rounded = round(duration_hours_remaining, 2)
+ msg = f"The vote is still open for {rounded} hours, but it would fail if closed now."
elif duration_hours_remaining is None:
msg = "The vote would fail if closed now."
else:
@@ -518,7 +520,8 @@ def _tabulate_vote_outcome_format(
return False, msg
if (duration_hours_remaining is not None) and (duration_hours_remaining > 0):
- msg = f"The vote is still open for {duration_hours_remaining} hours, but the vote would pass if closed now."
+ rounded = round(duration_hours_remaining, 2)
+ msg = f"The vote is still open for {rounded} hours, but it would pass if closed now."
else:
msg = "The vote passed."
return True, msg
diff --git a/atr/util.py b/atr/util.py
index 7fdd589..8e788fa 100644
--- a/atr/util.py
+++ b/atr/util.py
@@ -308,6 +308,8 @@ def is_dev_environment() -> bool:
def email_from_uid(uid: str) -> str | None:
if m := re.search(r"<([^>]+)>", uid):
return m.group(1).lower()
+ elif m := re.search(r"^([^@ ]+)@apache.org$", uid):
+ return uid
return None
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org