Omit needless ? in regex

Related to #462 and #597.
This commit is contained in:
Thaddee Tyl 2016-04-18 21:21:27 +02:00
parent 1358a3fae5
commit 954a47df7f

View File

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