Skip to content

Commit

Permalink
Filter out libraries with 0 commits from release report. (#1451)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjp93 authored Nov 14, 2024
1 parent da02208 commit 00a4dc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions libraries/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ def get_stats(self):
self._get_library_versions(library_order, version),
)
]
library_data = [
x for x in library_data if x["version_count"]["commit_count"] > 0
]
top_contributors = self._get_top_contributors_for_version()
# total messages sent during this release (version)
total_mailinglist_count = EmailData.objects.filter(version=version).aggregate(
Expand Down
8 changes: 7 additions & 1 deletion templates/admin/release_report_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ <h3>{{ item.library.name }}</h3>
<div>{{ item.library.description }}</div>
</div>
<div class="flex flex-col gap-y-4">
<h4>There were {{ item.version_count.commit_count }} commits in release {{ version.display_name }}</h4>
<h4>
There
{{ item.version_count.commit_count|pluralize:"was,were" }}
{{ item.version_count.commit_count }}
commit{{ item.version_count.commit_count|pluralize }}
in release {{ version.display_name }}
</h4>
{% with insertions=item.library_version.insertions deletions=item.library_version.deletions %}
<div>
{{ insertions|intcomma }} line{{ insertions|pluralize }} added, {{ deletions|intcomma }} line{{ deletions|pluralize }} removed
Expand Down

0 comments on commit 00a4dc7

Please sign in to comment.