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 bec842f  Set current revision instead of latest revision
bec842f is described below

commit bec842f3d81b57c49735a6d08c42637ed4b7a520
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Apr 23 17:13:50 2025 +0100

    Set current revision instead of latest revision
---
 atr/routes/draft.py                | 6 +++---
 atr/templates/draft-revisions.html | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/atr/routes/draft.py b/atr/routes/draft.py
index ed87ce8..b814baa 100644
--- a/atr/routes/draft.py
+++ b/atr/routes/draft.py
@@ -788,8 +788,8 @@ async def revisions(session: routes.CommitterSession, 
project_name: str, version
         parent_links_result = await data.execute(query)
         parent_map = {link.key: link.value for link in 
parent_links_result.scalars().all()}
 
-    # Determine the current latest revision
-    latest_revision_name = release.revision
+    # Determine the current revision
+    current_revision_name = release.revision
 
     revision_history = []
     prev_revision_files: set[pathlib.Path] | None = None
@@ -815,7 +815,7 @@ async def revisions(session: routes.CommitterSession, 
project_name: str, version
         version_name=version_name,
         release=release,
         revision_history=list(reversed(revision_history)),
-        latest_revision_name=latest_revision_name,
+        current_revision_name=current_revision_name,
     )
 
 
diff --git a/atr/templates/draft-revisions.html 
b/atr/templates/draft-revisions.html
index 4b3d356..e2d2829 100644
--- a/atr/templates/draft-revisions.html
+++ b/atr/templates/draft-revisions.html
@@ -33,7 +33,7 @@
           <h2 class="fs-6 my-2 mx-0 p-0 border-0 atr-sans">
             <a href="#{{ revision.name }}"
                class="fw-bold text-decoration-none text-body">{{ revision.name 
}}</a>
-            {% if revision.name == latest_revision_name %}<span class="badge 
bg-primary ms-2">Latest</span>{% endif %}
+            {% if revision.name == current_revision_name %}<span class="badge 
bg-primary ms-2">Current</span>{% endif %}
           </h2>
           <span class="fs-6 text-muted">
             {% if revision.timestamp %}
@@ -90,13 +90,13 @@
             {% endif %}
           {% endif %}
 
-          {% if revision.name != latest_revision_name %}
+          {% if revision.name != current_revision_name %}
             <h3 class="fs-6 fw-semibold mt-3 atr-sans">Actions</h3>
             <div class="mt-3">
               <form method="post"
                     action="{{ as_url(routes.draft.revision_set, 
project_name=project_name, version_name=version_name) }}">
                 <input type="hidden" name="revision_name" value="{{ 
revision.name }}" />
-                <button type="submit" class="btn btn-sm 
btn-outline-danger">Set this revision as latest</button>
+                <button type="submit" class="btn btn-sm 
btn-outline-danger">Set this revision as current</button>
               </form>
             </div>
           {% endif %}


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

Reply via email to