diff --git a/services/bitbucket/bitbucket-pull-request.service.js b/services/bitbucket/bitbucket-pull-request.service.js index d5f05a1b1f..0c6f610984 100644 --- a/services/bitbucket/bitbucket-pull-request.service.js +++ b/services/bitbucket/bitbucket-pull-request.service.js @@ -106,7 +106,6 @@ function pullRequestClassGenerator(raw) { return [ { title: 'Bitbucket open pull requests', - pattern: ':user/:repo', namedParams: { user: 'atlassian', repo: 'python-bitbucket', @@ -120,7 +119,6 @@ function pullRequestClassGenerator(raw) { repo: 'bar', }, queryParams: { server: 'https://bitbucket.mydomain.net' }, - pattern: ':user/:repo', staticPreview: this.render({ prs: 42 }), }, ] diff --git a/services/codetally/codetally.service.js b/services/codetally/codetally.service.js index 039837778e..d05bd7bc84 100644 --- a/services/codetally/codetally.service.js +++ b/services/codetally/codetally.service.js @@ -41,7 +41,6 @@ module.exports = class Codetally extends BaseJsonService { return [ { title: 'Codetally', - pattern: ':owner/:repo', namedParams: { owner: 'triggerman722', repo: 'colorstrap', diff --git a/services/gitter/gitter.service.js b/services/gitter/gitter.service.js index c669cba94c..308ee90d4f 100644 --- a/services/gitter/gitter.service.js +++ b/services/gitter/gitter.service.js @@ -18,7 +18,6 @@ module.exports = class Gitter extends BaseStaticService { return [ { title: 'Gitter', - pattern: ':user/:repo', namedParams: { user: 'nwjs', repo: 'nw.js', diff --git a/services/matrix/matrix.service.js b/services/matrix/matrix.service.js index 00745a5090..c86d3d0f64 100644 --- a/services/matrix/matrix.service.js +++ b/services/matrix/matrix.service.js @@ -201,7 +201,6 @@ module.exports = class Matrix extends BaseJsonService { { title: 'Matrix', namedParams: { roomAlias: 'twim:matrix.org' }, - pattern: ':roomAlias', staticPreview: this.render({ members: 42 }), documentation, }, @@ -209,7 +208,6 @@ module.exports = class Matrix extends BaseJsonService { title: 'Matrix', namedParams: { roomAlias: 'twim:matrix.org' }, queryParams: { server_fqdn: 'matrix.org' }, - pattern: ':roomAlias', staticPreview: this.render({ members: 42 }), documentation, }, diff --git a/services/transform-example.js b/services/transform-example.js index 12fc9ce49e..2c30f90b63 100644 --- a/services/transform-example.js +++ b/services/transform-example.js @@ -66,6 +66,13 @@ function validateExample(example, index, ServiceClass) { } at index ${index} also declares a dynamic previewUrl, which is not allowed` ) } + if (pattern === ServiceClass.route.pattern) { + throw new Error( + `Example for ${ + ServiceClass.name + } at index ${index} declares a redundant pattern which should be removed` + ) + } // Make sure we can build the full URL using these patterns. try { diff --git a/services/wordpress/wordpress-platform.service.js b/services/wordpress/wordpress-platform.service.js index 3e1efe412c..b84ab1b4ec 100644 --- a/services/wordpress/wordpress-platform.service.js +++ b/services/wordpress/wordpress-platform.service.js @@ -122,7 +122,6 @@ class WordpressPluginTestedVersion extends BaseWordpressPlatform { return [ { title: 'Wordpress Plugin: Tested WP Version', - pattern: ':slug', namedParams: { slug: 'bbpress' }, staticPreview: this.render({ version: '4.9.8', color: 'brightgreen' }), documentation: `
There is an alias for this badge. wordpress/v/:slug.svg