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 6031f74 Add number of files to each section in revision diffs
6031f74 is described below
commit 6031f742627e9898c81c88fc384e7ed3a3b166f1
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Apr 9 17:26:49 2025 +0100
Add number of files to each section in revision diffs
---
atr/routes/draft.py | 1 +
atr/templates/draft-revisions.html | 12 +++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/atr/routes/draft.py b/atr/routes/draft.py
index 57a4695..51e2704 100644
--- a/atr/routes/draft.py
+++ b/atr/routes/draft.py
@@ -636,6 +636,7 @@ async def revision_set(session: routes.CommitterSession,
project_name: str, vers
try:
# Target must be relative for the symlink
+ # TODO: We should probably log who is doing this, to create an audit
trail
await util.update_atomic_symlink(latest_symlink_path, revision_name)
except Exception as e:
logging.exception("Error updating latest symlink:")
diff --git a/atr/templates/draft-revisions.html
b/atr/templates/draft-revisions.html
index e144f93..0046f97 100644
--- a/atr/templates/draft-revisions.html
+++ b/atr/templates/draft-revisions.html
@@ -44,7 +44,9 @@
<p class="fst-italic text-muted">No file changes detected in this
revision.</p>
{% else %}
{% if revision.added %}
- <h3 class="fs-6 fw-semibold mt-3 atr-sans">Added files</h3>
+ <h3 class="fs-6 fw-semibold mt-3 atr-sans">
+ Added files <span class="font-monospace fw-normal">({{
revision.added|length }})</span>
+ </h3>
<ul class="list-group list-group-flush mb-2">
{% for file in revision.added %}
<li class="list-group-item list-group-item-success py-1 px-3
small rounded-2">{{ file }}</li>
@@ -53,7 +55,9 @@
{% endif %}
{% if revision.removed %}
- <h3 class="fs-6 fw-semibold mt-3 atr-sans">Removed files</h3>
+ <h3 class="fs-6 fw-semibold mt-3 atr-sans">
+ Removed files <span class="font-monospace fw-normal">({{
revision.removed|length }})</span>
+ </h3>
<ul class="list-group list-group-flush mb-2">
{% for file in revision.removed %}
<li class="list-group-item list-group-item-danger py-1 px-3
small rounded-2">{{ file }}</li>
@@ -62,7 +66,9 @@
{% endif %}
{% if revision.modified %}
- <h3 class="fs-6 fw-semibold mt-3 atr-sans">Modified files</h3>
+ <h3 class="fs-6 fw-semibold mt-3 atr-sans">
+ Modified files <span class="font-monospace fw-normal">({{
revision.modified|length }})</span>
+ </h3>
<ul class="list-group list-group-flush mb-2">
{% for file in revision.modified %}
<li class="list-group-item list-group-item-warning py-1 px-3
small rounded-2">{{ file }}</li>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]