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:
@@ -153,54 +153,45 @@ const propertyMap = {
|
||||
}
|
||||
|
||||
module.exports = class GithubIssueDetail extends GithubAuthV3Service {
|
||||
static get category() {
|
||||
return 'issue-tracking'
|
||||
static category = 'issue-tracking'
|
||||
static route = {
|
||||
base: 'github',
|
||||
pattern:
|
||||
':issueKind(issues|pulls)/detail/:property(state|title|author|label|comments|age|last-update)/:user/:repo/:number([0-9]+)',
|
||||
}
|
||||
|
||||
static get route() {
|
||||
return {
|
||||
base: 'github',
|
||||
pattern:
|
||||
':issueKind(issues|pulls)/detail/:property(state|title|author|label|comments|age|last-update)/:user/:repo/:number([0-9]+)',
|
||||
}
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
title: 'GitHub issue/pull request detail',
|
||||
namedParams: {
|
||||
issueKind: 'issues',
|
||||
property: 'state',
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
number: '979',
|
||||
},
|
||||
staticPreview: this.render({
|
||||
property: 'state',
|
||||
value: { state: 'closed' },
|
||||
isPR: false,
|
||||
number: '979',
|
||||
}),
|
||||
keywords: [
|
||||
'state',
|
||||
'title',
|
||||
'author',
|
||||
'label',
|
||||
'comments',
|
||||
'age',
|
||||
'last update',
|
||||
],
|
||||
documentation,
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub issue/pull request detail',
|
||||
namedParams: {
|
||||
issueKind: 'issues',
|
||||
property: 'state',
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
number: '979',
|
||||
},
|
||||
]
|
||||
}
|
||||
staticPreview: this.render({
|
||||
property: 'state',
|
||||
value: { state: 'closed' },
|
||||
isPR: false,
|
||||
number: '979',
|
||||
}),
|
||||
keywords: [
|
||||
'state',
|
||||
'title',
|
||||
'author',
|
||||
'label',
|
||||
'comments',
|
||||
'age',
|
||||
'last update',
|
||||
],
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
|
||||
static get defaultBadgeData() {
|
||||
return {
|
||||
label: 'issue/pull request',
|
||||
color: 'informational',
|
||||
}
|
||||
static defaultBadgeData = {
|
||||
label: 'issue/pull request',
|
||||
color: 'informational',
|
||||
}
|
||||
|
||||
static render({ property, value, isPR, number }) {
|
||||
|
||||
Reference in New Issue
Block a user