@dragonshorn-studios/elyseum-cli 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -25042,15 +25042,15 @@ class GithubPRCommentCoverageReporter {
|
|
|
25042
25042
|
else {
|
|
25043
25043
|
coverageQualityText += `> [!TIP]\n> ### Coverage Quality Gate Passed 🟩\n`;
|
|
25044
25044
|
}
|
|
25045
|
-
coverageQualityText += `> ${this.getIcon(diffCoverage.lines.percent)} Lines: ${diffCoverage.lines.percent.toFixed(2)}% (baseline: ${qualityGate}%)\n`;
|
|
25046
|
-
coverageQualityText += `> ${this.getIcon(diffCoverage.functions.percent)} Functions: ${diffCoverage.functions.percent.toFixed(2)}% (baseline: ${qualityGate}%)\n`;
|
|
25047
|
-
coverageQualityText += `> ${this.getIcon(diffCoverage.branches.percent)} Branches: ${diffCoverage.branches.percent.toFixed(2)}% (baseline: ${qualityGate}%)\n\n`;
|
|
25045
|
+
coverageQualityText += `> ${this.getIcon(diffCoverage.lines.percent, qualityGate, qualityGateFail)} Lines: ${diffCoverage.lines.percent.toFixed(2)}% (baseline: ${qualityGate}%, failing: ${qualityGateFail}%)\n`;
|
|
25046
|
+
coverageQualityText += `> ${this.getIcon(diffCoverage.functions.percent, qualityGate, qualityGateFail)} Functions: ${diffCoverage.functions.percent.toFixed(2)}% (baseline: ${qualityGate}%, failing: ${qualityGateFail}%)\n`;
|
|
25047
|
+
coverageQualityText += `> ${this.getIcon(diffCoverage.branches.percent, qualityGate, qualityGateFail)} Branches: ${diffCoverage.branches.percent.toFixed(2)}% (baseline: ${qualityGate}%, failing: ${qualityGateFail}%)\n\n`;
|
|
25048
25048
|
}
|
|
25049
25049
|
let summary = `| Type | Total | Covered | Percent |\n`;
|
|
25050
25050
|
summary += `|-----------|-------|---------|---------|\n`;
|
|
25051
|
-
summary += `| Lines | ${diffCoverage.lines.total} | ${diffCoverage.lines.covered} | ${this.getIcon(diffCoverage.lines.percent)} ${diffCoverage.lines.percent.toFixed(2)}% |\n`;
|
|
25052
|
-
summary += `| Functions | ${diffCoverage.functions.total} | ${diffCoverage.functions.covered} | ${this.getIcon(diffCoverage.functions.percent)} ${diffCoverage.functions.percent.toFixed(2)}% |\n`;
|
|
25053
|
-
summary += `| Branches | ${diffCoverage.branches.total} | ${diffCoverage.branches.covered} | ${this.getIcon(diffCoverage.branches.percent)} ${diffCoverage.branches.percent.toFixed(2)}% |\n`;
|
|
25051
|
+
summary += `| Lines | ${diffCoverage.lines.total} | ${diffCoverage.lines.covered} | ${this.getIcon(diffCoverage.lines.percent, qualityGate, qualityGateFail)} ${diffCoverage.lines.percent.toFixed(2)}% |\n`;
|
|
25052
|
+
summary += `| Functions | ${diffCoverage.functions.total} | ${diffCoverage.functions.covered} | ${this.getIcon(diffCoverage.functions.percent, qualityGate, qualityGateFail)} ${diffCoverage.functions.percent.toFixed(2)}% |\n`;
|
|
25053
|
+
summary += `| Branches | ${diffCoverage.branches.total} | ${diffCoverage.branches.covered} | ${this.getIcon(diffCoverage.branches.percent, qualityGate, qualityGateFail)} ${diffCoverage.branches.percent.toFixed(2)}% |\n`;
|
|
25054
25054
|
markdown += `### Coverage Summary\n\n${summary}`;
|
|
25055
25055
|
markdown += coverageQualityText;
|
|
25056
25056
|
let detailsTable = `\n<details>\n<summary>Coverage Details</summary>\n\n`;
|
|
@@ -25164,13 +25164,13 @@ class GithubPRCommentCoverageReporter {
|
|
|
25164
25164
|
fs$1.writeFileSync(annotationFilePath, JSON.stringify(checkData));
|
|
25165
25165
|
}
|
|
25166
25166
|
}
|
|
25167
|
-
getIcon(percent) {
|
|
25167
|
+
getIcon(percent, qualityGate, qualityGateFail) {
|
|
25168
25168
|
// emoji based
|
|
25169
|
-
if (percent >=
|
|
25169
|
+
if (percent >= qualityGate) {
|
|
25170
25170
|
// green circle
|
|
25171
25171
|
return "🟢";
|
|
25172
25172
|
}
|
|
25173
|
-
else if (percent >=
|
|
25173
|
+
else if (percent >= qualityGateFail) {
|
|
25174
25174
|
return "🟡";
|
|
25175
25175
|
}
|
|
25176
25176
|
else {
|