Add quality category and sort a couple other badges [scrutinizer] (#2483)

Ref #1905
This commit is contained in:
Paul Melnikow
2018-12-12 14:59:46 -05:00
committed by GitHub
parent f6da548dc3
commit 38ca6fc396
21 changed files with 49 additions and 24 deletions

View File

@@ -120,7 +120,7 @@ class AmoRating extends LegacyService {
class AmoUsers extends LegacyService {
static get category() {
return 'other'
return 'downloads'
}
static get route() {

View File

@@ -60,7 +60,7 @@ module.exports = class AzureDevOpsCoverage extends BaseAzureDevOpsService {
}
static get category() {
return 'build'
return 'quality'
}
static get examples() {

View File

@@ -4,6 +4,7 @@ const Joi = require('joi')
const categories = [
{ id: 'build', name: 'Build' },
{ id: 'quality', name: 'Quality' },
{ id: 'chat', name: 'Chat' },
{ id: 'dependencies', name: 'Dependencies' },
{ id: 'size', name: 'Size' },

View File

@@ -27,7 +27,7 @@ module.exports = class CIIBestPracticesService extends BaseJsonService {
}
static get category() {
return 'build'
return 'quality'
}
static get examples() {

View File

@@ -9,7 +9,7 @@ const {
module.exports = class CocoapodsMetrics extends LegacyService {
static get category() {
return 'other'
return 'quality'
}
static get route() {

View File

@@ -15,7 +15,7 @@ const schema = Joi.object({
module.exports = class CodacyCoverage extends BaseSvgScrapingService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -8,7 +8,7 @@ const schema = Joi.object({ message: codacyGrade }).required()
module.exports = class CodacyGrade extends BaseSvgScrapingService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -142,7 +142,7 @@ module.exports = class Codeclimate extends LegacyService {
}
static get category() {
return 'build'
return 'quality'
}
static get examples() {

View File

@@ -9,7 +9,7 @@ const {
module.exports = class Codecov extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -8,7 +8,7 @@ const {
module.exports = class Coveralls extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -6,7 +6,7 @@ const { makeBadgeData: getBadgeData } = require('../../lib/badge-data')
// For Coverity Code Advisor On Demand.
module.exports = class CoverityOnDemand extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -5,7 +5,7 @@ const { makeBadgeData: getBadgeData } = require('../../lib/badge-data')
module.exports = class CoverityScan extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -24,7 +24,7 @@ module.exports = class DependabotSemverCompatibility extends BaseJsonService {
}
static get category() {
return 'other'
return 'quality'
}
static get route() {

View File

@@ -59,7 +59,7 @@ class BaseJenkinsCoverage extends BaseJsonService {
}
static get category() {
return 'build'
return 'quality'
}
static buildUrl(scheme, host, job, plugin) {

View File

@@ -24,7 +24,7 @@ module.exports = class LeanpubBookSummaryService extends BaseJsonService {
}
static get category() {
return 'other'
return 'funding'
}
static get examples() {

View File

@@ -7,7 +7,7 @@ const { metric } = require('../../lib/text-formatters')
module.exports = class LgtmAlerts extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -6,7 +6,7 @@ const { checkErrorResponse } = require('../../lib/error-helper')
module.exports = class LgtmGrade extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -60,7 +60,7 @@ class PuppetforgeModuleDownloads extends LegacyService {
class PuppetforgeModuleEndorsement extends LegacyService {
static get category() {
return 'other'
return 'rating'
}
static get route() {

View File

@@ -7,7 +7,7 @@ const {
coveragePercentage: coveragePercentageColor,
} = require('../../lib/color-formatters')
module.exports = class Scrutinizer extends LegacyService {
class ScrutinizerBuild extends LegacyService {
static get category() {
return 'build'
}
@@ -18,6 +18,29 @@ module.exports = class Scrutinizer extends LegacyService {
}
}
static get examples() {
return [
{
title: 'Scrutinizer Build',
previewUrl: 'build/g/filp/whoops',
},
]
}
static registerLegacyRouteHandler({ camp, cache }) {}
}
class Scrutinizer extends LegacyService {
static get category() {
return 'quality'
}
static get route() {
return {
base: 'scrutinizer',
}
}
static get examples() {
return [
{
@@ -32,10 +55,6 @@ module.exports = class Scrutinizer extends LegacyService {
title: 'Scrutinizer branch',
previewUrl: 'coverage/g/doctrine/doctrine2/master',
},
{
title: 'Scrutinizer Build',
previewUrl: 'build/g/filp/whoops',
},
]
}
@@ -114,3 +133,8 @@ module.exports = class Scrutinizer extends LegacyService {
)
}
}
module.exports = {
ScrutinizerBuild,
Scrutinizer,
}

View File

@@ -10,7 +10,7 @@ const {
module.exports = class Sonarqube extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {

View File

@@ -8,7 +8,7 @@ const {
module.exports = class TeamcityCoverage extends LegacyService {
static get category() {
return 'build'
return 'quality'
}
static get route() {