You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/06/02 10:48:10 UTC

(tooling-trusted-releases) 02/03: Add template guidance for new vote resolution email body field

This is an automated email from the ASF dual-hosted git repository.

alitheg pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git

commit db6e92fdda4d36239364d9431f8c108b90b26c69
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Mon Jun 1 16:54:00 2026 +0100

    Add template guidance for new vote resolution email body field
---
 atr/get/resolve.py                 | 2 +-
 atr/shared/resolve.py              | 7 ++++++-
 tests/unit/test_vote_resolution.py | 6 +++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/atr/get/resolve.py b/atr/get/resolve.py
index e7bcc5e6..a7e72619 100644
--- a/atr/get/resolve.py
+++ b/atr/get/resolve.py
@@ -319,7 +319,7 @@ async def selected(  # noqa: C901
     skip.append("email_bcc")
 
     if form_cls is shared.resolve.SubmitForm:
-        defaults["result_subject"] = tabulate.vote_result_subject(release, "<resolution>")
+        defaults["result_subject"] = tabulate.vote_result_subject(release, "{{OUTCOME}}")
 
     pre_submit: htm.Element | None = None
     if (not binding_sufficient) and (pass_fail_allowed or bypass_active):
diff --git a/atr/shared/resolve.py b/atr/shared/resolve.py
index dd0d6c83..9a64154c 100644
--- a/atr/shared/resolve.py
+++ b/atr/shared/resolve.py
@@ -60,7 +60,12 @@ class CancelSubmitForm(ResolveFormBase):
 class SubmitForm(ResolveFormBase):
     variant: SUBMIT = form.value(SUBMIT)
     result_subject: str = form.label("Subject", widget=form.Widget.STATIC, default="")
-    email_body: str = form.label("Body", widget=form.Widget.TEXTAREA, max_length=100_000)
+    email_body: str = form.label(
+        "Body",
+        "{{OUTCOME}} is a placeholder - it will be replaced with the vote result you select when the email is sent.",
+        widget=form.Widget.TEXTAREA,
+        max_length=100_000,
+    )
     vote_result: Literal["Passed", "Failed", "Cancelled"] = form.label("Vote result", widget=form.Widget.RADIO)
     automatic_resolve_when_finished: form.Bool = form.label(
         "Automatically resolve the second round vote",
diff --git a/tests/unit/test_vote_resolution.py b/tests/unit/test_vote_resolution.py
index 23641aff..9aba9982 100644
--- a/tests/unit/test_vote_resolution.py
+++ b/tests/unit/test_vote_resolution.py
@@ -601,7 +601,7 @@ async def test_resolve_page_allows_manual_continuation_when_archive_lookup_fails
     assert form_render.call_args.kwargs["defaults"] == {
         "email_body": "",
         "result_email_to": "dev@project.apache.org",
-        "result_subject": "[RESULT] [VOTE] Release Project 1.0.0 <RESOLUTION>",
+        "result_subject": "[RESULT] [VOTE] Release Project 1.0.0 {{OUTCOME}}",
         "vote_mode": sql.VoteMode.EMAIL,
         "vote_seq": None,
     }
@@ -628,7 +628,7 @@ async def test_resolve_page_allows_manual_continuation_when_tabulation_is_invali
     assert form_render.call_args.kwargs["defaults"] == {
         "email_body": "",
         "result_email_to": "dev@project.apache.org",
-        "result_subject": "[RESULT] [VOTE] Release Project 1.0.0 <RESOLUTION>",
+        "result_subject": "[RESULT] [VOTE] Release Project 1.0.0 {{OUTCOME}}",
         "vote_mode": sql.VoteMode.EMAIL,
         "vote_seq": None,
     }
@@ -661,7 +661,7 @@ async def test_resolve_page_allows_manual_continuation_when_thread_fetch_fails(
     assert form_render.call_args.kwargs["defaults"] == {
         "email_body": "",
         "result_email_to": "dev@project.apache.org",
-        "result_subject": "[RESULT] [VOTE] Release Project 1.0.0 <RESOLUTION>",
+        "result_subject": "[RESULT] [VOTE] Release Project 1.0.0 {{OUTCOME}}",
         "vote_mode": sql.VoteMode.EMAIL,
         "vote_seq": None,
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org