From ec15df342c598c718c4ac6c7c439c7a071d5279e Mon Sep 17 00:00:00 2001 From: FUJI Goro Date: Thu, 30 May 2019 12:12:56 +0900 Subject: [PATCH] Fix codecov badge url --- lib/codecov.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/codecov.js b/lib/codecov.js index 632ce09..f3bebe8 100644 --- a/lib/codecov.js +++ b/lib/codecov.js @@ -6,6 +6,7 @@ // https://codecov.io/${service}/${user}/${repo}/graphs/badge.svg // https://codecov.io/${service}/${user}/${repo}/graphs/badge.svg?branch=${branch} // https://codecov.io/${service}/${user}/${repo}/branch/${branch}/graphs/badge.svg +// https://codecov.io/${service}/${user}/${repo}/branch/${branch}/graph/badge.svg // https://img.shields.io/codecov/c/${service}/${user}/${repo}.svg // https://img.shields.io/codecov/c/${service}/${user}/${repo}/${branch}.svg @@ -20,7 +21,7 @@ module.exports = function (parsedUrl) { } else if ((match = url.match(/img.shields.io\/codecov\/c\/(.+)\/(.+)\/(.+)\..+/))) { // shields badge data = { service: match[1], user: match[2], repo: match[3] }; - } else if ((match = url.match(/codecov.io\/(.+)\/(.+)\/(.+)\/branch\/(.+)\/(coverage|graphs\/badge)\..+/))) { + } else if ((match = url.match(/codecov.io\/(.+)\/(.+)\/(.+)\/branch\/(.+)\/(coverage|graphs?\/badge)\..+/))) { // codecov badge with branch url data = { service: match[1], user: match[2], repo: match[3], branch: match[4] }; } else if ((match = url.match(/codecov.io\/(.+)\/(.+)\/(.+)\/(coverage|graphs\/badge)\..+/))) {