refactor(github): convert some clasess to static fields (#5556)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -5,36 +5,25 @@ const { BaseGithubLanguage } = require('./github-languages-base')
|
||||
const { documentation } = require('./github-helpers')
|
||||
|
||||
module.exports = class GithubCodeSize extends BaseGithubLanguage {
|
||||
static get category() {
|
||||
return 'size'
|
||||
static category = 'size'
|
||||
static route = {
|
||||
base: 'github/languages/code-size',
|
||||
pattern: ':user/:repo',
|
||||
}
|
||||
|
||||
static get route() {
|
||||
return {
|
||||
base: 'github/languages/code-size',
|
||||
pattern: ':user/:repo',
|
||||
}
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
title: 'GitHub code size in bytes',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
},
|
||||
staticPreview: this.render({ size: 1625000 }),
|
||||
documentation,
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub code size in bytes',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
},
|
||||
]
|
||||
}
|
||||
staticPreview: this.render({ size: 1625000 }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
|
||||
static get defaultBadgeData() {
|
||||
return {
|
||||
label: 'code size',
|
||||
}
|
||||
}
|
||||
static defaultBadgeData = { label: 'code size' }
|
||||
|
||||
static render({ size }) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user