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 24585be  Give the correct URL to automatically generated KEYS files
24585be is described below

commit 24585bea916fd6c615fd12dff51dac1d6106b7fe
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jun 17 17:18:57 2025 +0100

    Give the correct URL to automatically generated KEYS files
---
 atr/construct.py    | 5 +++--
 atr/routes/draft.py | 4 ++++
 atr/tasks/vote.py   | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/atr/construct.py b/atr/construct.py
index 02704f1..1184ea8 100644
--- a/atr/construct.py
+++ b/atr/construct.py
@@ -38,6 +38,7 @@ class AnnounceReleaseOptions:
 class StartVoteOptions:
     asfuid: str
     fullname: str
+    committee_name: str
     project_name: str
     version_name: str
     vote_duration: int
@@ -110,9 +111,9 @@ async def start_vote_body(body: str, options: 
StartVoteOptions) -> str:
     project_short_display_name = release.project.short_display_name if 
release.project else options.project_name
 
     keys_file = None
-    keys_file_path = util.get_finished_dir() / options.project_name / "KEYS"
+    keys_file_path = util.get_finished_dir() / options.committee_name / "KEYS"
     if await aiofiles.os.path.isfile(keys_file_path):
-        keys_file = f"https://{host}/downloads/{options.project_name}/KEYS";
+        keys_file = f"https://{host}/downloads/{options.committee_name}/KEYS";
 
     checklist_content = ""
     async with db.session() as data:
diff --git a/atr/routes/draft.py b/atr/routes/draft.py
index c7d8f10..dab5af5 100644
--- a/atr/routes/draft.py
+++ b/atr/routes/draft.py
@@ -487,6 +487,9 @@ async def vote_preview(
         return await session.redirect(root.index, error="Invalid form data")
 
     release = await session.release(project_name, version_name)
+    if release.committee is None:
+        raise routes.FlashError("Release has no associated committee")
+
     form_body: str = util.unwrap(form.body.data)
     asfuid = session.uid
     project_name = release.project.name
@@ -498,6 +501,7 @@ async def vote_preview(
         construct.StartVoteOptions(
             asfuid=asfuid,
             fullname=session.fullname,
+            committee_name=release.committee.display_name,
             project_name=project_name,
             version_name=version_name,
             vote_duration=vote_duration,
diff --git a/atr/tasks/vote.py b/atr/tasks/vote.py
index 68742f5..218f38b 100644
--- a/atr/tasks/vote.py
+++ b/atr/tasks/vote.py
@@ -115,6 +115,7 @@ async def _initiate_core_logic(args: Initiate) -> dict[str, 
Any]:
         construct.StartVoteOptions(
             asfuid=args.initiator_id,
             fullname=args.initiator_fullname,
+            committee_name=release.committee.display_name,
             project_name=release.project.name,
             version_name=release.version,
             vote_duration=args.vote_duration,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to