Total downloads does not count all releases
Author: liamgCreated Jul 14, 2021Updated Sep 11, 2026
Labelsbugservice-badge
Are you experiencing an issue with...
shields.io
Description
The number in the total downloads badge for our repo has been fluctuating lately. We believe the issue is the badge is only counting downloads for the most recent 500 releases, instead of paging over all API result pages for every release.
Link to the badge
https://img.shields.io/github/downloads/aquasecurity/tfsec/total
Possible Solution
Iterate over each page of the GitHub API call results using per_page=1000 and page=N.
I think the issue is here: https://github.com/badges/shields/blob/23c0406bedfc6930735e8f5ea75dfe34faf1f290/services/github/github-downloads.service.js#L246-L251
Source: badges/shields