Skip to content

Instantly share code, notes, and snippets.

@Southclaws
Created July 3, 2018 13:27
Show Gist options
  • Save Southclaws/65ae09c6fcd1314d1f86410c845684d5 to your computer and use it in GitHub Desktop.
Save Southclaws/65ae09c6fcd1314d1f86410c845684d5 to your computer and use it in GitHub Desktop.
Count total downloads from GitHub releases using the GitHub API v3 and a simple jq expression
#!/usr/bin/env sh
# https://jqplay.org/s/CpDPlGueMM
# usage: `github-release-downloads.sh Username/Repository`
curl -s https://api.github.com/repos/$1/releases |
jq '[.[].assets | .[].download_count] | add' -
@Alasnkz
Copy link

Alasnkz commented Jul 3, 2018

comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment