Skip to content
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

Wrong semantic colouring for badge of GitHub Release #10968

Closed
akiirui opened this issue Mar 21, 2025 · 2 comments
Closed

Wrong semantic colouring for badge of GitHub Release #10968

akiirui opened this issue Mar 21, 2025 · 2 comments
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@akiirui
Copy link

akiirui commented Mar 21, 2025

Are you experiencing an issue with...

shields.io

🐞 Description

For the GitHub releases badge, it should use orange if the latest release is a pre-release and blue otherwise. So blue if this is off, orange if it is on (from #10268 (comment))

Such as https://github.com/mpv-player/mpv/releases/tag/v0.39.0, it isn't mark as "pre-release", but badge uses "orange" by the default.

🔗 Link to the badge

GitHub Release https://img.shields.io/github/v/release/mpv-player/mpv

💡 Possible Solution

It should be blue.

@akiirui akiirui added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Mar 21, 2025
@akiirui akiirui changed the title Wrong semantic colouring for badge of GitHub Version Wrong semantic colouring for badge of GitHub Release Mar 21, 2025
@chris48s
Copy link
Member

With the GitHub releases badge, we'll defer to the pre-release flag checkbox for stable releases.
For a semver-like version number, we'll assume it is a pre-release if its a zero-version (like in this case) or has a tag like -alpha -beta, etc.
In this case, we're considering 0.39.0 pre-release/unstable because the major version is zero
https://semver.org/#spec-item-4
If you want to override it, you are free to do that: https://img.shields.io/github/v/release/mpv-player/mpv?color=blue

@akiirui
Copy link
Author

akiirui commented Mar 21, 2025

Okay thanks for your answer.

@akiirui akiirui closed this as completed Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

No branches or pull requests

2 participants