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 6378b47 Organise release policy form inputs into sections named after
phases
6378b47 is described below
commit 6378b47606f8cff1e46f9d41895561e91b9f35a1
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jun 24 18:48:12 2025 +0100
Organise release policy form inputs into sections named after phases
---
atr/routes/projects.py | 47 +++++++++++++++------------
atr/templates/project-view.html | 72 ++++++++++++++++++++++++-----------------
2 files changed, 68 insertions(+), 51 deletions(-)
diff --git a/atr/routes/projects.py b/atr/routes/projects.py
index b7d6e57..89b2180 100644
--- a/atr/routes/projects.py
+++ b/atr/routes/projects.py
@@ -61,10 +61,22 @@ class ReleasePolicyForm(util.QuartFormTyped):
"""
project_name = wtforms.HiddenField("project_name")
- default_start_vote_template_hash = wtforms.HiddenField()
- default_announce_release_template_hash = wtforms.HiddenField()
- default_min_hours_value_at_render = wtforms.HiddenField()
+ # Compose section
+ source_artifact_paths = wtforms.StringField(
+ "Source artifact paths",
+ widget=wtforms.widgets.TextArea(),
+ render_kw={"rows": 5},
+ description="Paths to source artifacts to be included in the release.",
+ )
+ binary_artifact_paths = wtforms.StringField(
+ "Binary artifact paths",
+ widget=wtforms.widgets.TextArea(),
+ render_kw={"rows": 5},
+ description="Paths to binary artifacts to be included in the release.",
+ )
+
+ # Vote section
mailto_addresses = wtforms.FieldList(
wtforms.StringField(
"Email",
@@ -79,6 +91,11 @@ class ReleasePolicyForm(util.QuartFormTyped):
),
min_entries=1,
)
+ manual_vote = wtforms.BooleanField(
+ "Manual voting process",
+ description="If this is set then the vote will be completely manual
and following policy is ignored.",
+ )
+ default_min_hours_value_at_render = wtforms.HiddenField()
min_hours = wtforms.IntegerField(
"Minimum voting period",
validators=[
@@ -89,9 +106,8 @@ class ReleasePolicyForm(util.QuartFormTyped):
description="The minimum time to run the vote, in hours. Must be 0 or
between 72 and 144 inclusive."
" If 0, then wait until 3 +1 votes and more +1 than -1.",
)
- manual_vote = wtforms.BooleanField(
- "Manual voting process",
- description="If this is set then the vote will be completely manual
and following policy is ignored.",
+ pause_for_rm = wtforms.BooleanField(
+ "Pause for RM", description="If enabled, RM can confirm manually if
the vote has passed."
)
release_checklist = wtforms.StringField(
"Release checklist",
@@ -99,33 +115,22 @@ class ReleasePolicyForm(util.QuartFormTyped):
render_kw={"rows": 10},
description="Markdown text describing how to test release candidates.",
)
+ default_start_vote_template_hash = wtforms.HiddenField()
start_vote_template = wtforms.StringField(
"Start vote template",
widget=wtforms.widgets.TextArea(),
render_kw={"rows": 10},
description="Email template for messages to start a vote on a
release.",
)
+
+ # Finish section
+ default_announce_release_template_hash = wtforms.HiddenField()
announce_release_template = wtforms.StringField(
"Announce release template",
widget=wtforms.widgets.TextArea(),
render_kw={"rows": 10},
description="Email template for messages to announce a finished
release.",
)
- binary_artifact_paths = wtforms.StringField(
- "Binary artifact paths",
- widget=wtforms.widgets.TextArea(),
- render_kw={"rows": 5},
- description="Paths to binary artifacts to be included in the release.",
- )
- source_artifact_paths = wtforms.StringField(
- "Source artifact paths",
- widget=wtforms.widgets.TextArea(),
- render_kw={"rows": 5},
- description="Paths to source artifacts to be included in the release.",
- )
- pause_for_rm = wtforms.BooleanField(
- "Pause for RM", description="If enabled, RM can confirm manually if
the vote has passed."
- )
submit_policy = wtforms.SubmitField("Save")
diff --git a/atr/templates/project-view.html b/atr/templates/project-view.html
index ae01da9..d7ebced 100644
--- a/atr/templates/project-view.html
+++ b/atr/templates/project-view.html
@@ -82,6 +82,32 @@
{{ policy_form.default_announce_release_template_hash() }}
{{ policy_form.default_min_hours_value_at_render() }}
+ <div class="row mb-3">
+ <h3 class="mt-3 col-md-3 col-form-label text-md-end
fs-4">Compose options</h3>
+ </div>
+
+ <div class="mb-3 pb-3 row border-bottom">
+ {{ forms.label(policy_form.source_artifact_paths, col="md3") }}
+ <div class="col-sm-8">
+ {{ forms.widget(policy_form.source_artifact_paths,
classes="form-control font-monospace") }}
+ {{ forms.errors(policy_form.source_artifact_paths) }}
+ {{ forms.description(policy_form.source_artifact_paths) }}
+ </div>
+ </div>
+
+ <div class="mb-3 pb-3 row">
+ {{ forms.label(policy_form.binary_artifact_paths, col="md3") }}
+ <div class="col-sm-8">
+ {{ forms.widget(policy_form.binary_artifact_paths,
classes="form-control font-monospace") }}
+ {{ forms.errors(policy_form.binary_artifact_paths) }}
+ {{ forms.description(policy_form.binary_artifact_paths) }}
+ </div>
+ </div>
+
+ <div class="row mt-5 mb-3">
+ <h3 class="col-md-3 col-form-label text-md-end fs-4">Vote
options</h3>
+ </div>
+
<div class="mb-3 pb-3 row border-bottom">
{{ forms.label(policy_form.mailto_addresses.entries[0],
col="md3") }}
<div class="col-sm-8">
@@ -111,6 +137,17 @@
</div>
</div>
+ <div class="mb-3 pb-3 row border-bottom">
+ {{ forms.label(policy_form.pause_for_rm, col="md3-high") }}
+ <div class="col-sm-8">
+ <div class="form-check">
+ {{ forms.widget(policy_form.pause_for_rm,
classes="form-check-input", boolean_label="Enable") }}
+ {{ forms.errors(policy_form.pause_for_rm,
classes="invalid-feedback d-block") }}
+ </div>
+ {{ forms.description(policy_form.pause_for_rm) }}
+ </div>
+ </div>
+
<div class="mb-3 pb-3 row border-bottom">
{{ forms.label(policy_form.release_checklist, col="md3") }}
<div class="col-sm-8">
@@ -120,7 +157,7 @@
</div>
</div>
- <div class="mb-3 pb-3 row border-bottom">
+ <div class="mb-3 pb-3 row">
{{ forms.label(policy_form.start_vote_template, col="md3") }}
<div class="col-sm-8">
{{ forms.widget(policy_form.start_vote_template, rows="10",
classes="form-control font-monospace") }}
@@ -129,6 +166,10 @@
</div>
</div>
+ <div class="row mt-5 mb-3">
+ <h3 class="col-md-3 col-form-label text-md-end fs-4">Finish
options</h3>
+ </div>
+
<div class="mb-3 pb-3 row border-bottom">
{{ forms.label(policy_form.announce_release_template, col="md3")
}}
<div class="col-sm-8">
@@ -138,35 +179,6 @@
</div>
</div>
- <div class="mb-3 pb-3 row border-bottom">
- {{ forms.label(policy_form.binary_artifact_paths, col="md3") }}
- <div class="col-sm-8">
- {{ forms.widget(policy_form.binary_artifact_paths,
classes="form-control font-monospace") }}
- {{ forms.errors(policy_form.binary_artifact_paths) }}
- {{ forms.description(policy_form.binary_artifact_paths) }}
- </div>
- </div>
-
- <div class="mb-3 pb-3 row border-bottom">
- {{ forms.label(policy_form.source_artifact_paths, col="md3") }}
- <div class="col-sm-8">
- {{ forms.widget(policy_form.source_artifact_paths,
classes="form-control font-monospace") }}
- {{ forms.errors(policy_form.source_artifact_paths) }}
- {{ forms.description(policy_form.source_artifact_paths) }}
- </div>
- </div>
-
- <div class="mb-3 pb-3 row border-bottom">
- {{ forms.label(policy_form.pause_for_rm, col="md3-high") }}
- <div class="col-sm-8">
- <div class="form-check">
- {{ forms.widget(policy_form.pause_for_rm,
classes="form-check-input", boolean_label="Enable") }}
- {{ forms.errors(policy_form.pause_for_rm,
classes="invalid-feedback d-block") }}
- </div>
- {{ forms.description(policy_form.pause_for_rm) }}
- </div>
- </div>
-
<div class="row">
<div class="col-sm-9 offset-sm-3">{{
policy_form.submit_policy(class_="btn btn-primary mt-2") }}</div>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]