@dragonshorn-studios/elyseum-cli 1.0.10 → 1.0.12
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-coverage-command.d.ts","sourceRoot":"","sources":["../../src/commands/diff-coverage-command.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAMjD,qBAAa,mBAAoB,YAAW,OAAO;IACjD,IAAI,EAAE,MAAM,CAAmB;IAC/B,MAAM,CAAC,EAAE,YAAY,CA2BnB;gBACU,QAAQ,EAAE,UAAU;IAInB,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAqI5B,qBAAqB;
|
|
1
|
+
{"version":3,"file":"diff-coverage-command.d.ts","sourceRoot":"","sources":["../../src/commands/diff-coverage-command.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAMjD,qBAAa,mBAAoB,YAAW,OAAO;IACjD,IAAI,EAAE,MAAM,CAAmB;IAC/B,MAAM,CAAC,EAAE,YAAY,CA2BnB;gBACU,QAAQ,EAAE,UAAU;IAInB,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAqI5B,qBAAqB;YAuLrB,iBAAiB;YAajB,eAAe;CA4E9B"}
|
package/dist/index.js
CHANGED
|
@@ -24993,10 +24993,6 @@ class GithubPRCommentCoverageReporter {
|
|
|
24993
24993
|
type: "int",
|
|
24994
24994
|
default: 50,
|
|
24995
24995
|
},
|
|
24996
|
-
"fail-action-on-quality-gate": {
|
|
24997
|
-
help: "Mark the check as failed if the quality gate is not met",
|
|
24998
|
-
action: "store_true",
|
|
24999
|
-
},
|
|
25000
24996
|
};
|
|
25001
24997
|
}
|
|
25002
24998
|
report(diffCoverage) {
|
|
@@ -25015,7 +25011,6 @@ class GithubPRCommentCoverageReporter {
|
|
|
25015
25011
|
"reporter.coverage.quality-gate-fail",
|
|
25016
25012
|
"reporter.coverage.github-pr-comment.quality-gate-fail",
|
|
25017
25013
|
], 50);
|
|
25018
|
-
const failActionOnQualityGate = Config$1.getInstance().getFirst(["reporter.coverage.github-pr-comment.fail-action-on-quality-gate"], false);
|
|
25019
25014
|
const commentFilePath = Config$1.getInstance().getFirst(["reporter.coverage.github-pr-comment.comment-file-path"], "coverage/github.pr.coverage.md");
|
|
25020
25015
|
const annotationFilePath = Config$1.getInstance().getFirst(["reporter.coverage.github-pr-comment.annotation-file-path"], "coverage/github.pr.annotations.json");
|
|
25021
25016
|
let repoName = process.env.GITHUB_REPOSITORY || "";
|
|
@@ -25138,9 +25133,7 @@ class GithubPRCommentCoverageReporter {
|
|
|
25138
25133
|
head_sha: diffCoverage.headSha,
|
|
25139
25134
|
status: "completed",
|
|
25140
25135
|
conclusion: qualityGateFailed
|
|
25141
|
-
?
|
|
25142
|
-
? "failure"
|
|
25143
|
-
: "neutral"
|
|
25136
|
+
? "failure"
|
|
25144
25137
|
: qualityGateWarning
|
|
25145
25138
|
? "neutral"
|
|
25146
25139
|
: "success",
|
|
@@ -54464,9 +54457,16 @@ class DiffCoverageCommand {
|
|
|
54464
54457
|
}
|
|
54465
54458
|
let changedLineNumbers = new Set();
|
|
54466
54459
|
let changedLineCount = 0;
|
|
54460
|
+
let coverageFoundLineNumbers = new Set();
|
|
54461
|
+
for (let line of coverageData.lines.details) {
|
|
54462
|
+
coverageFoundLineNumbers.add(line.line);
|
|
54463
|
+
}
|
|
54467
54464
|
for (let hunk of file.diff.hunks) {
|
|
54468
54465
|
let hunkLine = 0;
|
|
54469
54466
|
for (let line = hunk.newStart; line < hunk.newStart + hunk.newLines; line++) {
|
|
54467
|
+
if (!coverageFoundLineNumbers.has(line)) {
|
|
54468
|
+
continue; // this line is not taken into account in coverage
|
|
54469
|
+
}
|
|
54470
54470
|
if (hunk.lines) {
|
|
54471
54471
|
if (hunk.lines[hunkLine].startsWith("-")) {
|
|
54472
54472
|
continue;
|