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

Refactor - use renderVersionBadge - part 4 [github] #10656

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jNullj
Copy link
Collaborator

@jNullj jNullj commented Nov 4, 2024

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-osversionorclojars` but i couldn't find anything else to refactor, let me know if you find anything.
Until you do, closes #2026

Sometimes API would indicate if a version is pre-release while the version number does not have to be semantically a prerelease like in github-release service.
We don't use a isPrerelease that can also force a non-preleases as we trust here developer semantic over API tagging.
@jNullj jNullj added developer-experience Dev tooling, test framework, and CI core Server, BaseService, GitHub auth, Shared helpers javascript [dependabot only] Pull requests that update Javascript packages labels Nov 4, 2024
Copy link
Contributor

github-actions bot commented Nov 4, 2024

Warnings
⚠️ This PR modified service code for github but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @jNullj!

Generated by 🚫 dangerJS against a206b7d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth, Shared helpers developer-experience Dev tooling, test framework, and CI javascript [dependabot only] Pull requests that update Javascript packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure consistent usage of renderVersionBadge
1 participant