Refactor service classes [snyk sonar sourceforge sourcegraph spack] (#5632)

* Refactor service classes snyk-sonar-sourceforge-sourcegraph-spack

* Amend end-line issue on pull-request #5632

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
Christian Haag
2020-10-03 18:14:47 +02:00
committed by GitHub
parent 5d3c26efe1
commit fba860fbe9
14 changed files with 400 additions and 510 deletions

View File

@@ -9,33 +9,25 @@ const schema = Joi.object({
}).required()
module.exports = class Sourcegraph extends BaseJsonService {
static get category() {
return 'other'
static category = 'other'
static route = {
base: 'sourcegraph/rrc',
pattern: ':repo(.*?)',
}
static get route() {
return {
base: 'sourcegraph/rrc',
pattern: ':repo(.*?)',
}
}
static get examples() {
return [
{
title: 'Sourcegraph for Repo Reference Count',
pattern: ':repo',
namedParams: {
repo: 'github.com/gorilla/mux',
},
staticPreview: this.render({ projectsCount: '9.9k projects' }),
static examples = [
{
title: 'Sourcegraph for Repo Reference Count',
pattern: ':repo',
namedParams: {
repo: 'github.com/gorilla/mux',
},
]
}
staticPreview: this.render({ projectsCount: '9.9k projects' }),
},
]
static get defaultBadgeData() {
return { color: 'brightgreen', label: 'used by' }
}
static defaultBadgeData = { color: 'brightgreen', label: 'used by' }
static render({ projectsCount }) {
return {