Example: Canonicalize urlPattern to pattern (#2341)

Close #2334 

To avoid merge conflicts, I've deferred removing the aliasing logic in `prepareExamples`. That whole function will be refactored momentarily, and there's also #2339 open.
This commit is contained in:
Paul Melnikow
2018-11-18 09:03:33 -05:00
committed by GitHub
parent 73fcc1ccac
commit 3ad742e79a
63 changed files with 114 additions and 115 deletions

View File

@@ -30,13 +30,13 @@ module.exports = class CodacyCoverage extends BaseSvgScrapingService {
return [
{
title: 'Codacy coverage',
urlPattern: ':projectId',
pattern: ':projectId',
staticExample: this.render({ percentage: 90 }),
exampleUrl: '59d607d0e311408885e418004068ea58',
},
{
title: 'Codacy branch coverage',
urlPattern: ':projectId/:branch',
pattern: ':projectId/:branch',
staticExample: this.render({ percentage: 90 }),
exampleUrl: '59d607d0e311408885e418004068ea58/master',
},

View File

@@ -23,13 +23,13 @@ module.exports = class CodacyGrade extends BaseSvgScrapingService {
return [
{
title: 'Codacy grade',
urlPattern: ':projectId',
pattern: ':projectId',
staticExample: this.render({ grade: 'A' }),
exampleUrl: 'e27821fb6289410b8f58338c7e0bc686',
},
{
title: 'Codacy branch grade',
urlPattern: ':projectId/:branch',
pattern: ':projectId/:branch',
staticExample: this.render({ grade: 'A' }),
exampleUrl: 'e27821fb6289410b8f58338c7e0bc686/master',
},