mirror of
https://github.com/badges/shields.git
synced 2025-10-22 20:32:32 +03:00
@@ -88,6 +88,10 @@ const whichMap = {
|
||||
}
|
||||
|
||||
module.exports = class CodeclimateAnalysis extends BaseJsonService {
|
||||
static get category() {
|
||||
return 'analysis'
|
||||
}
|
||||
|
||||
static get route() {
|
||||
return {
|
||||
base: 'codeclimate',
|
||||
@@ -96,10 +100,6 @@ module.exports = class CodeclimateAnalysis extends BaseJsonService {
|
||||
}
|
||||
}
|
||||
|
||||
static get category() {
|
||||
return 'analysis'
|
||||
}
|
||||
|
||||
static get examples() {
|
||||
return [
|
||||
{
|
||||
@@ -140,6 +140,12 @@ module.exports = class CodeclimateAnalysis extends BaseJsonService {
|
||||
]
|
||||
}
|
||||
|
||||
static render({ which, ...props }) {
|
||||
const { render } = whichMap[which]
|
||||
|
||||
return render(props)
|
||||
}
|
||||
|
||||
async fetch({ user, repo }) {
|
||||
const {
|
||||
id: repoId,
|
||||
@@ -159,12 +165,6 @@ module.exports = class CodeclimateAnalysis extends BaseJsonService {
|
||||
return data
|
||||
}
|
||||
|
||||
static render({ which, ...props }) {
|
||||
const { render } = whichMap[which]
|
||||
|
||||
return render(props)
|
||||
}
|
||||
|
||||
async handle({ which, user, repo }) {
|
||||
const { transform } = whichMap[which]
|
||||
|
||||
|
Reference in New Issue
Block a user