Update regex for backwards compatibility, but do not match "coverage"

This commit is contained in:
Greg Bowler 2016-03-11 16:56:04 +00:00
parent 47ae3d85e2
commit d2a6b5a4ea

View File

@ -2450,7 +2450,7 @@ cache(function(data, match, sendBadge, request) {
}));
// Codacy integration
camp.route(/^\/codacy?\/([^\/]+)(?:\/(.+))?\.(svg|png|gif|jpg|json)$/,
camp.route(/^\/codacy\/(?:grade\/)?(?!coverage\/)([^\/]+)(?:\/(.+))?\.(svg|png|gif|jpg|json)$/,
cache(function(data, match, sendBadge, request) {
var projectId = match[1]; // eg. e27821fb6289410b8f58338c7e0bc686
var branch = match[2];