Skip to content

Commit

Permalink
Fixed bug in download metrics script. (#8418)
Browse files Browse the repository at this point in the history
- Now will count downloads of all artifacts in github releases instead
of just the first one.
  • Loading branch information
jonn-smith committed Jul 14, 2023
1 parent d79823f commit 1529aa1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/get_gatk_stats_app_script.gs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,12 @@ function recordGitHubReleaseDownloadCount(githubUrl, authToken) {
var tagName = release['tag_name'];
var downloadCount = 0;
if (release['assets'].length != 0) {
var downloadCount = release['assets'][0]['download_count'];
var downloadCount = 0
release['assets'].forEach(
function (asset) {
downloadCount += asset['download_count'];
}
)
}

// Add our new download count to our row:
Expand Down Expand Up @@ -379,3 +384,4 @@ function get_image_pull_count(image) {
return imageStats['pull_count'];
}


0 comments on commit 1529aa1

Please sign in to comment.