Refactor badge color functions (#2742)
- Replace the idea of color schemes with the idea of named colors (since none of our colorschemes have used `colorA`)
- Pass through the normalized color to `_shields_test` to harmonize with BaseService and simplify testing
- Update service tests
- Move responsibility for color generation into the npm package
- Remove several color helper functions and their tests
- Update gh-badge public API to accept `color` and `labelColor`
This is a precursor to refactoring some of the logo code for #2473.
This commit is contained in:
@@ -63,7 +63,7 @@ module.exports = class GithubForks extends LegacyService {
|
||||
const data = JSON.parse(buffer)
|
||||
const forks = data.forks_count
|
||||
badgeData.text[1] = forks
|
||||
badgeData.colorscheme = null
|
||||
badgeData.colorscheme = undefined
|
||||
badgeData.colorB = '#4183C4'
|
||||
sendBadge(format, badgeData)
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user