-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add [dub] score badge service #9549
Conversation
|
🚀 Updated review app: https://pr-9549-badges-shields.fly.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. A few comments but nothing major. Great to see you're branching out beyond docs :)
services/dub/dub-score.service.js
Outdated
|
||
static examples = [ | ||
{ | ||
title: 'DUB SCORE', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: 'DUB SCORE', | |
title: 'DUB Score', |
services/dub/dub-score.service.js
Outdated
static defaultBadgeData = { label: 'SCORE' } | ||
|
||
static render({ score }) { | ||
return { | ||
label: 'SCORE', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Labels should be lowercase (x2)
https://github.com/badges/shields/blob/master/CONTRIBUTING.md#badge-guidelines
services/dub/dub-score.tester.js
Outdated
.get('/vibe-d.json') | ||
.expectBadge({ | ||
label: 'SCORE', | ||
message: isWithinRange(0, 5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use Joi.number()
on numeric strings. Instead of a regex, we can just use Joi.number().min(0).max(5)
here.
LGTM - thanks 👍 |
Closes #8662