Add warnings alongside deprecated URL patterns (#3715)

Ref #3714
This commit is contained in:
Paul Melnikow
2019-07-14 19:14:19 -04:00
committed by GitHub
parent 6a2f384860
commit b493fbf70e
9 changed files with 18 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ class DiscourseBase extends BaseJsonService {
static buildRoute(metric) {
return {
base: 'discourse',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
pattern: `:scheme(http|https)/:host/${metric}`,
}
}

View File

@@ -23,6 +23,8 @@ module.exports = class JiraIssue extends BaseJsonService {
static get route() {
return {
base: 'jira/issue',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
pattern: ':protocol(http|https)/:hostAndPath(.+)/:issueKey',
}
}

View File

@@ -35,6 +35,8 @@ module.exports = class JiraSprint extends BaseJsonService {
static get route() {
return {
base: 'jira/sprint',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
pattern: ':protocol(http|https)/:hostAndPath(.+)/:sprintId',
}
}

View File

@@ -27,6 +27,8 @@ module.exports = class MavenMetadata extends BaseXmlService {
static get route() {
return {
base: 'maven-metadata/v',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
pattern: ':protocol(http|https)/:hostAndPath+',
}
}

View File

@@ -44,6 +44,8 @@ module.exports = class Nexus extends BaseJsonService {
// API pattern:
// /nexus/(r|s|<repo-name>)/(http|https)/<nexus.host>[:port][/<entry-path>]/<group>/<artifact>[:k1=v1[:k2=v2[...]]]
pattern:
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
':repo(r|s|[^/]+)/:scheme(http|https)/:hostAndPath+/:groupId/:artifactId([^/:]+):queryOpt(:.+)?',
}
}

View File

@@ -22,6 +22,8 @@ module.exports = class TeamCityBuild extends TeamCityBase {
static get route() {
return {
base: 'teamcity',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
format: '(?:codebetter|(http|https)/(.+)/(s|e))/([^/]+)',
capture: ['protocol', 'hostAndPath', 'verbosity', 'buildId'],
}

View File

@@ -23,6 +23,8 @@ module.exports = class TeamCityCoverage extends TeamCityBase {
static get route() {
return {
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
base: 'teamcity/coverage',
format: '(?:(http|https)/(.+)/)?([^/]+)',
capture: ['protocol', 'hostAndPath', 'buildId'],

View File

@@ -12,6 +12,8 @@ class TwitterUrl extends BaseService {
static get route() {
return {
base: 'twitter/url',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
pattern: ':protocol(https|http)/:hostAndPath+',
}
}

View File

@@ -35,6 +35,8 @@ module.exports = class Website extends BaseService {
static get route() {
return {
base: 'website',
// Do not base new services on this route pattern.
// See https://github.com/badges/shields/issues/3714
pattern: ':protocol(https|http)/:hostAndPath+',
queryParamSchema,
}