Refactor - use renderVersionBadge - part 4 [github] #10656
+8
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the codebase to use the renderVersionBadge function for rendering version badges.
Refactored github releases and github tags.
The pull request also modifies tests where needed.
I added
forcePrerelease
option to renderVersionBadge for github, might be usefull for any api that indicates prerelease explicitly.while for github release we don't effect colors, for github tags this pr changes the logic a bit, and improves horizontal consistency.
we used to mark all tags blue if user picked latest over semver sort. this is odd as with releases we do mark prerelease in orange.
I guess the diffrence is due to api indicating prereleases, but we already try to guess prereleases in renderVersionBadge so i figured we might just as well try and use it while increasing consistency.
This PR should be the last in this refactor, we do have a few outliers services like `
visual-studio-app-center-releases-osversion
or
clojars` but i couldn't find anything else to refactor, let me know if you find anything.Until you do, closes #2026