Github releases badge rounds minor version to x.x, causing an incorrect version, when actual version is x.xx
If a repo has a two digit minor version, the releases badge is rounding it to one digit, causing an incorrect release version to be displayed:
Example: https://img.shields.io/github/release/whispersystems/signal-ios.svg
I've seen this twice: Actual version: 2.19 Shown version: 2.2
Actual version: 2.20 Shown version: 2.2
No bueno! Thanks for the report.
Confirmed still broken in master. https://shields-staging.herokuapp.com/github/release/whispersystems/signal-ios.svg
Based on https://github.com/WhisperSystems/Signal-iOS/releases this should be 2.20.0.1 but I'm seeing 2.2.
If anyone would like to look into it, feel free! Adding a test with .intercept() is a great way to troubleshoot something like this.
If I call https://api.github.com/repos/whispersystems/signal-ios/releases/latest I am getting back a response containing
{
...
"tag_name": "2.2",
...
}
Indeed… I wonder if the subsequent entries are actually releases. Maybe they are just tags.
If I go way back in the release history, some earlier ones are formatted differently: https://github.com/WhisperSystems/Signal-iOS/releases?after=2.2
The tag badge shows the number we want:
https://img.shields.io/github/tag/whispersystems/signal-ios.svg
Could it be they are just specifying release title and no tag version is specified so it just uses the latest tag version that can be found. (or vise-versa)

Edit:
It think the above might be the case:
https://github.com/WhisperSystems/Signal-iOS/releases/latest

Edit2:
Maybe not:
https://github.com/WhisperSystems/Signal-iOS/releases/tag/2.20.0.1

Seems the problem is that, despite the text in the UI, these are not releases, only tags. In other words, this is the expected behavior. Feel free to re-open if I've misunderstood!