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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user