From 7e81d7eb6190432eb80ea51c3cc6ca23c62c2605 Mon Sep 17 00:00:00 2001 From: daveoconnor Date: Mon, 31 Mar 2025 11:31:04 -0700 Subject: [PATCH] Add check for dependency addition/removal counts on release page (#1703) (#1722) --- templates/versions/detail.html | 55 ++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/templates/versions/detail.html b/templates/versions/detail.html index 4b40bdb8..a5c7a8ed 100644 --- a/templates/versions/detail.html +++ b/templates/versions/detail.html @@ -120,28 +120,39 @@ {% endif %} - {% if deps.added or deps.removed %} -
-

Dependencies

-
- There {{ deps.added|pluralize:"was,were" }} - - {{ deps.added }} dependenc{{ deps.added|pluralize:"y,ies"}} added - - - (in {{ deps.increased_dep_lib_count }} librar{{ deps.increased_dep_lib_count|pluralize:"y,ies" }}) - - and - - {{ deps.removed }} dependenc{{ deps.removed|pluralize:"y,ies"}} removed - - - (in {{ deps.decreased_dep_lib_count }} librar{{ deps.decreased_dep_lib_count|pluralize:"y,ies" }}) - - this release. -
-
+ {% if not version.beta %} + {% if deps.added or deps.removed %} +
+

Dependencies

+
+ {% if deps.added %} + There {{ deps.added|pluralize:"was,were" }} + + {{ deps.added }} dependenc{{ deps.added|pluralize:"y,ies"}} added + + + (in {{ deps.increased_dep_lib_count }} librar{{ deps.increased_dep_lib_count|pluralize:"y,ies" }}) + + {% endif %} + {% if deps.added and deps.removed %} + and + {% endif %} + {% if deps.removed %} + {% if not deps.added %} + There {{ deps.removed|pluralize:"was,were" }} + {% endif %} + + {{ deps.removed }} dependenc{{ deps.removed|pluralize:"y,ies"}} removed + + + (in {{ deps.decreased_dep_lib_count }} librar{{ deps.decreased_dep_lib_count|pluralize:"y,ies" }}) + + {% endif %} + this release. +
+
+ {% endif %} {% endif %} {% if top_contributors_release %}