convert some service classes to static fields, run [GitHubForks GitHubGoMod GitHubIssueDetail GitHubIssues GitHubLabels GitHubLanguageCount GitHubLastCommit] (#5590)

* refactor(githubforks): convert to static fields

* refactor(githubgomod): convert to static fields

* refactor(githubissuedetail): convert to static fields

* refactor(githubissues): convert to static fields

* refactor(githublabels): convert to static fields

* refactor(githublanguagecount): convert to static fields

* refactor(githublastcommit): convert to static fields

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
This commit is contained in:
Caleb Cartwright
2020-09-22 18:18:54 -05:00
committed by GitHub
parent 484c652719
commit ec5b976c0d
7 changed files with 343 additions and 434 deletions

View File

@@ -9,37 +9,22 @@ const schema = Joi.object({
}).required()
module.exports = class GithubLabels extends GithubAuthV3Service {
static get category() {
return 'issue-tracking'
}
static get route() {
return {
base: 'github/labels',
pattern: ':user/:repo/:name',
}
}
static get examples() {
return [
{
title: 'GitHub labels',
namedParams: {
user: 'atom',
repo: 'atom',
name: 'help-wanted',
},
staticPreview: this.render({ name: 'help-wanted', color: '#159818' }),
documentation,
static category = 'issue-tracking'
static route = { base: 'github/labels', pattern: ':user/:repo/:name' }
static examples = [
{
title: 'GitHub labels',
namedParams: {
user: 'atom',
repo: 'atom',
name: 'help-wanted',
},
]
}
staticPreview: this.render({ name: 'help-wanted', color: '#159818' }),
documentation,
},
]
static get defaultBadgeData() {
return {
label: ' ',
}
}
static defaultBadgeData = { label: ' ' }
static render({ name, color }) {
return {