convert some service classes to static props, run [gem gerrit] (#5553)
* refactor(gem): convert to static props * refactor(gerrit): convert to static props Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -13,37 +13,23 @@ const schema = Joi.object({
|
||||
}).required()
|
||||
|
||||
module.exports = class Gerrit extends BaseJsonService {
|
||||
static get category() {
|
||||
return 'issue-tracking'
|
||||
}
|
||||
|
||||
static get route() {
|
||||
return {
|
||||
base: 'gerrit',
|
||||
pattern: ':changeId',
|
||||
queryParamSchema,
|
||||
}
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
title: 'Gerrit change status',
|
||||
namedParams: {
|
||||
changeId: '1011478',
|
||||
},
|
||||
queryParams: { baseUrl: 'https://android-review.googlesource.com' },
|
||||
staticPreview: this.render({
|
||||
changeId: 1011478,
|
||||
status: 'MERGED',
|
||||
}),
|
||||
static category = 'issue-tracking'
|
||||
static route = { base: 'gerrit', pattern: ':changeId', queryParamSchema }
|
||||
static examples = [
|
||||
{
|
||||
title: 'Gerrit change status',
|
||||
namedParams: {
|
||||
changeId: '1011478',
|
||||
},
|
||||
]
|
||||
}
|
||||
queryParams: { baseUrl: 'https://android-review.googlesource.com' },
|
||||
staticPreview: this.render({
|
||||
changeId: 1011478,
|
||||
status: 'MERGED',
|
||||
}),
|
||||
},
|
||||
]
|
||||
|
||||
static get defaultBadgeData() {
|
||||
return { label: 'gerrit' }
|
||||
}
|
||||
static defaultBadgeData = { label: 'gerrit' }
|
||||
|
||||
static getColor({ displayStatus }) {
|
||||
if (displayStatus === 'new') {
|
||||
|
||||
Reference in New Issue
Block a user