danger-plugin-codecov
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -36,3 +36,3 @@ "use strict"; | ||
const shieldQueryParams = "?longCache=true&style=flat-square"; | ||
const diff = parseFloat(lastCommitCoverage) - parseFloat(baseCoverage); | ||
const diff = lastCommitCoverage - baseCoverage; | ||
const change = diff >= 0 ? Change.increase : Change.decrease; | ||
@@ -42,3 +42,3 @@ const absDiffFixed = Math.abs(diff).toFixed(1); | ||
const color = change === Change.increase ? "green" : "red"; | ||
const percentage = parseFloat(lastCommitCoverage).toFixed(1); | ||
const percentage = lastCommitCoverage.toFixed(1); | ||
const shieldUrlDiff = `${baseShieldUrl}/coverage-${sign}${absDiffFixed}%25-${color}.svg${shieldQueryParams}`; | ||
@@ -63,6 +63,6 @@ const shieldUrlResult = `${baseShieldUrl}/%3D-${percentage}%25-blue.svg${shieldQueryParams}`; | ||
result = retrieveCoverage(yield call); | ||
if (result) { | ||
if (!isNaN(result)) { | ||
break; | ||
} | ||
yield timeout(5000); | ||
yield timeout(10000); | ||
} | ||
@@ -78,3 +78,3 @@ catch (e) { | ||
try { | ||
return report.commit.totals.c; | ||
return parseFloat(report.commit.totals.c); | ||
} | ||
@@ -85,3 +85,3 @@ catch (_a) { | ||
try { | ||
return report.commits.pop().totals.c; | ||
return parseFloat(report.commits.pop().totals.c); | ||
} | ||
@@ -88,0 +88,0 @@ catch (_b) { |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "dist/index.js", | ||
@@ -23,0 +23,0 @@ "types": "dist/index.d.ts", |
7070