-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
download count for latest pre-release #1113
Comments
As far as I can see GitHub REST API does not allow to get latest prerelease or even filter all releases to get only prereleases. So we have to list all releases and find prerelease. Do we want to do in this way? We could add some limits, e.g. check only first page of results (30 by default, max 100). |
If 2.0.0-rc2 is followed by 2.0.0, it's not helpful to see stats for 2.0.0-rc2 on a badge. So, the Shields semantics for "latest (pre-)release" is "latest release including prereleases." |
Thanks! OK. I will do it in this way. |
Implements #1113. Removed extra space in 2 cases (failing tests without this change): 1) Github downloads for latest release [ GET http://localhost:1111/github/downloads/photonstorm/phaser/latest/total.json ]: ValidationError: child "value" fails because ["value" with value "63k " fails to match the required pattern: /^[0-9]+[kMGTPEZY]?$/] -- 2) Github downloads-pre for latest release [ GET http://localhost:1111/github/downloads-pre/photonstorm/phaser/latest/total.json ]: ValidationError: child "value" fails because ["value" with value "34 " fails to match the required pattern: /^[0-9]+[kMGTPEZY]?$/] -- 3) Github downloads for specific asset from latest release [ GET http://localhost:1111/github/downloads/atom/atom/latest/atom-amd64.deb.json ]: ValidationError: child "value" fails because ["value" with value "3k [atom-amd64.deb]" fails to match the required pattern: /^[0-9]+[kMGTPEZY]? \[atom-amd64\.deb\]$/] -- 4) Github downloads-pre for specific asset from latest release [ GET http://localhost:1111/github/downloads-pre/atom/atom/latest/atom-amd64.deb.json ]: ValidationError: child "value" fails because ["value" with value "372 [atom-amd64.deb]" fails to match the required pattern: /^[0-9]+[kMGTPEZY]? \[atom-amd64\.deb\]$/]
Done in #1140. |
So I wait for the next deploy now. A lot of great PR's with interesting new possibilities recently! 👍 |
We have a download count badge with several options for github releases, e.g. for a fixed tag or more importantly last release (since it updates automatically with your new releases):
![dl from latest-pre](https://user-images.githubusercontent.com/9874850/31031491-fc8c240c-a558-11e7-9f59-5dd4d4ce4240.png)
I request a download count for "latest pre-release" as well. Some repos use releases for stable versions and
pre-releases for betas for example. So both badges would show always up to date data without the need to update the badge to a hard coded tag all the time.
The text was updated successfully, but these errors were encountered: