From ba9fd926af3f55cab93b4687e3776c20e5140d49 Mon Sep 17 00:00:00 2001 From: Benjamin Thiele Date: Fri, 1 Dec 2017 06:05:59 -0600 Subject: [PATCH] fix: encode the percent sign in url Noticed this was returning a 400 because the percent sign is not encoded. This should fix the request. --- cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 9c9799b..e06f53d 100755 --- a/cli.js +++ b/cli.js @@ -21,7 +21,7 @@ const getBadge = report => { const coverage = report.total.statements.pct const colour = getColour(coverage) - return `https://img.shields.io/badge/Coverage-${coverage}%-${colour}.svg` + return `https://img.shields.io/badge/Coverage-${coverage}${encodeURI('%')}-${colour}.svg` } const download = (url, cb) => {