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

use downloads renderer in next batch of classes, run [hexpm homebrewdownloads jenkinsplugininstalls jetbrainsdownloads jsdelivr modrinth]] #7210

Merged
merged 2 commits into from
Oct 31, 2021

Conversation

calebcartwright
Copy link
Member

Continuation from #7163

@calebcartwright calebcartwright added the service-badge New or updated service badge label Oct 29, 2021
@shields-cd shields-cd temporarily deployed to shields-staging-pr-7210 October 29, 2021 18:44 Inactive
@@ -27,6 +29,7 @@ function renderDownloadsBadge({
labelOverride,
colorOverride,
messageSuffixOverride,
versionedLabelPrefix = 'downloads',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to support use cases where classes want to support tag/version specific download counts but are using a label other than downloads

@shields-ci
Copy link

shields-ci commented Oct 29, 2021

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

Generated by 🚫 dangerJS against 12259c5

Comment on lines -26 to -40
static _getSchema(version) {
if (version) {
return schemaInstallationsPerVersion
} else {
return schemaInstallations
}
}

static _getLabel(version) {
if (version) {
return `installs@${version}`
} else {
return 'installs'
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to keep the diff focused on the refactoring to utilize the new render helper, but felt inclined to update this one with our more canonical fetch/transform/render separation of concerns and applied some broader refactoring to that end

@calebcartwright calebcartwright merged commit 8941038 into master Oct 31, 2021
@calebcartwright calebcartwright deleted the downloads-renderer-pt2 branch October 31, 2021 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants