From 477d357286c6a1da36409919b376a31c6fcb6241 Mon Sep 17 00:00:00 2001 From: Paul Melnikow <github@paulmelnikow.com> Date: Wed, 5 Dec 2018 14:17:37 -0500 Subject: [PATCH] Sort some badges; add an Activity category (#2448) --- lib/all-badge-examples.js | 7 +++++++ services/categories.js | 1 + .../eclipse-marketplace-update.service.js | 2 +- .../github/github-commit-activity.service.js | 2 +- services/github/github-commit-status.service.js | 2 +- services/github/github-commits-since.service.js | 2 +- services/github/github-contributors.service.js | 2 +- services/github/github-last-commit.service.js | 2 +- services/github/github-release-date.service.js | 2 +- services/npm/npm-type-definitions.service.js | 2 +- services/php-eye/php-eye-hhvm.service.js | 2 +- services/php-eye/php-eye-php-version.service.js | 2 +- .../puppetforge/puppetforge-modules.service.js | 2 +- services/pypi/pypi-implementation.service.js | 2 +- services/pypi/pypi-wheel.service.js | 2 +- .../stackexchange-monthlyquestions.service.js | 2 +- .../stackexchange-reputation.service.js | 2 +- .../stackexchange-taginfo.service.js | 2 +- services/steam/steam-workshop.service.js | 16 ++++++++-------- services/travis/travis-php-version.service.js | 2 +- .../vaadin-directory/vaadin-directory.service.js | 2 +- 21 files changed, 34 insertions(+), 26 deletions(-) diff --git a/lib/all-badge-examples.js b/lib/all-badge-examples.js index ce2bdb7140..93a1414918 100644 --- a/lib/all-badge-examples.js +++ b/lib/all-badge-examples.js @@ -94,6 +94,13 @@ const allBadgeExamples = [ }, examples: [], }, + { + category: { + id: 'activity', + name: 'Activity', + }, + examples: [], + }, { category: { id: 'other', diff --git a/services/categories.js b/services/categories.js index dcfd96a8fb..b543939f57 100644 --- a/services/categories.js +++ b/services/categories.js @@ -16,6 +16,7 @@ const categories = [ { id: 'version', name: 'Version' }, { id: 'platform-support', name: 'Platform & Version Support' }, { id: 'monitoring', name: 'Monitoring' }, + { id: 'activity', name: 'Activity' }, { id: 'other', name: 'Other' }, ] diff --git a/services/eclipse-marketplace/eclipse-marketplace-update.service.js b/services/eclipse-marketplace/eclipse-marketplace-update.service.js index cf2a80fbdf..90c91ea20c 100644 --- a/services/eclipse-marketplace/eclipse-marketplace-update.service.js +++ b/services/eclipse-marketplace/eclipse-marketplace-update.service.js @@ -16,7 +16,7 @@ const updateResponseSchema = Joi.object({ module.exports = class EclipseMarketplaceUpdate extends EclipseMarketplaceBase { static get category() { - return 'other' + return 'activity' } static get defaultBadgeData() { diff --git a/services/github/github-commit-activity.service.js b/services/github/github-commit-activity.service.js index 7bc93cd87b..40f0dcb2df 100644 --- a/services/github/github-commit-activity.service.js +++ b/services/github/github-commit-activity.service.js @@ -13,7 +13,7 @@ const { module.exports = class GithubCommitActivity extends LegacyService { static get category() { - return 'version' + return 'activity' } static get route() { diff --git a/services/github/github-commit-status.service.js b/services/github/github-commit-status.service.js index be8767a4bd..8f55840cb4 100644 --- a/services/github/github-commit-status.service.js +++ b/services/github/github-commit-status.service.js @@ -9,7 +9,7 @@ const { module.exports = class GithubCommitStatus extends LegacyService { static get category() { - return 'other' + return 'issue-tracking' } static get route() { diff --git a/services/github/github-commits-since.service.js b/services/github/github-commits-since.service.js index 2d7954ee1b..d6e782c4de 100644 --- a/services/github/github-commits-since.service.js +++ b/services/github/github-commits-since.service.js @@ -10,7 +10,7 @@ const { documentation } = require('./github-helpers') module.exports = class GithubCommitsSince extends LegacyService { static get category() { - return 'version' + return 'activity' } static get route() { diff --git a/services/github/github-contributors.service.js b/services/github/github-contributors.service.js index ff7367ae59..20b5d5755d 100644 --- a/services/github/github-contributors.service.js +++ b/services/github/github-contributors.service.js @@ -13,7 +13,7 @@ const { module.exports = class GithubContributors extends LegacyService { static get category() { - return 'other' + return 'activity' } static get route() { diff --git a/services/github/github-last-commit.service.js b/services/github/github-last-commit.service.js index f8ec4a9150..a245aa4b1e 100644 --- a/services/github/github-last-commit.service.js +++ b/services/github/github-last-commit.service.js @@ -14,7 +14,7 @@ const { module.exports = class GithubLastCommit extends LegacyService { static get category() { - return 'other' + return 'activity' } static get route() { diff --git a/services/github/github-release-date.service.js b/services/github/github-release-date.service.js index bb56433bf7..79b9c0f956 100644 --- a/services/github/github-release-date.service.js +++ b/services/github/github-release-date.service.js @@ -12,7 +12,7 @@ const { documentation } = require('./github-helpers') module.exports = class GithubReleaseDate extends LegacyService { static get category() { - return 'other' + return 'activity' } static get route() { diff --git a/services/npm/npm-type-definitions.service.js b/services/npm/npm-type-definitions.service.js index c7b9bde72a..353dc67e72 100644 --- a/services/npm/npm-type-definitions.service.js +++ b/services/npm/npm-type-definitions.service.js @@ -7,7 +7,7 @@ const NpmBase = require('./npm-base') // package.json. module.exports = class NpmTypeDefinitions extends NpmBase { static get category() { - return 'other' + return 'platform-support' } static get defaultBadgeData() { diff --git a/services/php-eye/php-eye-hhvm.service.js b/services/php-eye/php-eye-hhvm.service.js index 5ec23795e7..b15f00eacb 100644 --- a/services/php-eye/php-eye-hhvm.service.js +++ b/services/php-eye/php-eye-hhvm.service.js @@ -7,7 +7,7 @@ const { omitv } = require('../../lib/text-formatters') module.exports = class PhpeyeHhvm extends LegacyService { static get category() { - return 'version' + return 'platform-support' } static get route() { diff --git a/services/php-eye/php-eye-php-version.service.js b/services/php-eye/php-eye-php-version.service.js index df8cf0c058..11d50b5319 100644 --- a/services/php-eye/php-eye-php-version.service.js +++ b/services/php-eye/php-eye-php-version.service.js @@ -10,7 +10,7 @@ const log = require('../../lib/log') module.exports = class PhpEyePhpVersion extends LegacyService { static get category() { - return 'version' + return 'platform-support' } static get route() { diff --git a/services/puppetforge/puppetforge-modules.service.js b/services/puppetforge/puppetforge-modules.service.js index 2020848051..3b60333fc3 100644 --- a/services/puppetforge/puppetforge-modules.service.js +++ b/services/puppetforge/puppetforge-modules.service.js @@ -83,7 +83,7 @@ class PuppetforgeModuleEndorsement extends LegacyService { class PuppetforgeModuleFeedback extends LegacyService { static get category() { - return 'other' + return 'rating' } static get route() { diff --git a/services/pypi/pypi-implementation.service.js b/services/pypi/pypi-implementation.service.js index 1a49484bde..96adfa2eb8 100644 --- a/services/pypi/pypi-implementation.service.js +++ b/services/pypi/pypi-implementation.service.js @@ -5,7 +5,7 @@ const { parseClassifiers } = require('./pypi-helpers') module.exports = class PypiImplementation extends PypiBase { static get category() { - return 'other' + return 'platform-support' } static get route() { diff --git a/services/pypi/pypi-wheel.service.js b/services/pypi/pypi-wheel.service.js index 1f1f951404..bdbbd97885 100644 --- a/services/pypi/pypi-wheel.service.js +++ b/services/pypi/pypi-wheel.service.js @@ -5,7 +5,7 @@ const { getPackageFormats } = require('./pypi-helpers') module.exports = class PypiWheel extends PypiBase { static get category() { - return 'other' + return 'platform-support' } static get route() { diff --git a/services/stackexchange/stackexchange-monthlyquestions.service.js b/services/stackexchange/stackexchange-monthlyquestions.service.js index 92a4106fcc..bb71f744df 100644 --- a/services/stackexchange/stackexchange-monthlyquestions.service.js +++ b/services/stackexchange/stackexchange-monthlyquestions.service.js @@ -13,7 +13,7 @@ const tagSchema = Joi.object({ module.exports = class StackExchangeMonthlyQuestions extends BaseJsonService { static get category() { - return 'other' + return 'chat' } static get defaultBadgeData() { diff --git a/services/stackexchange/stackexchange-reputation.service.js b/services/stackexchange/stackexchange-reputation.service.js index 7b7ce7cbb3..3ab35ccb6f 100644 --- a/services/stackexchange/stackexchange-reputation.service.js +++ b/services/stackexchange/stackexchange-reputation.service.js @@ -20,7 +20,7 @@ const reputationSchema = Joi.object({ module.exports = class StackExchangeReputation extends BaseJsonService { static get category() { - return 'rating' + return 'chat' } static get route() { diff --git a/services/stackexchange/stackexchange-taginfo.service.js b/services/stackexchange/stackexchange-taginfo.service.js index 2baf8b3626..803abaac58 100644 --- a/services/stackexchange/stackexchange-taginfo.service.js +++ b/services/stackexchange/stackexchange-taginfo.service.js @@ -19,7 +19,7 @@ const tagSchema = Joi.object({ module.exports = class StackExchangeQuestions extends BaseJsonService { static get category() { - return 'other' + return 'chat' } static get defaultBadgeData() { diff --git a/services/steam/steam-workshop.service.js b/services/steam/steam-workshop.service.js index cdb0e190ac..f6e6039614 100644 --- a/services/steam/steam-workshop.service.js +++ b/services/steam/steam-workshop.service.js @@ -221,14 +221,6 @@ class SteamFileService extends BaseSteamAPI { async onRequest({ response }) { throw new Error(`onRequest() wasn't implemented for ${this.name}`) } - - static get defaultBadgeData() { - return { label: 'steam' } - } - - static get category() { - return 'other' - } } class SteamFileSize extends SteamFileService { @@ -300,6 +292,10 @@ class SteamFileReleaseDate extends SteamFileService { }, ] } + + static get category() { + return 'activity' + } } class SteamFileSubscriptions extends SteamFileService { @@ -442,6 +438,10 @@ class SteamFileViews extends SteamFileService { }, ] } + + static get category() { + return 'other' + } } module.exports = { diff --git a/services/travis/travis-php-version.service.js b/services/travis/travis-php-version.service.js index 8c39ea0914..4c23fa47fd 100644 --- a/services/travis/travis-php-version.service.js +++ b/services/travis/travis-php-version.service.js @@ -11,7 +11,7 @@ const { module.exports = class TravisPhpVersion extends LegacyService { static get category() { - return 'version' + return 'platform-support' } static get route() { diff --git a/services/vaadin-directory/vaadin-directory.service.js b/services/vaadin-directory/vaadin-directory.service.js index 1a122b0579..3c47841cba 100644 --- a/services/vaadin-directory/vaadin-directory.service.js +++ b/services/vaadin-directory/vaadin-directory.service.js @@ -136,7 +136,7 @@ class VaadinDirectoryStatus extends LegacyService { class VaadinDirectoryReleaseDate extends LegacyService { static get category() { - return 'other' + return 'activity' } static get route() { -- GitLab