@dragonshorn-studios/elyseum-cli 1.0.9 → 1.0.10
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;YAgLrB,iBAAiB;YAajB,eAAe;CA4E9B"}
|
package/dist/index.js
CHANGED
|
@@ -24993,6 +24993,10 @@ 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
|
+
},
|
|
24996
25000
|
};
|
|
24997
25001
|
}
|
|
24998
25002
|
report(diffCoverage) {
|
|
@@ -25011,6 +25015,7 @@ class GithubPRCommentCoverageReporter {
|
|
|
25011
25015
|
"reporter.coverage.quality-gate-fail",
|
|
25012
25016
|
"reporter.coverage.github-pr-comment.quality-gate-fail",
|
|
25013
25017
|
], 50);
|
|
25018
|
+
const failActionOnQualityGate = Config$1.getInstance().getFirst(["reporter.coverage.github-pr-comment.fail-action-on-quality-gate"], false);
|
|
25014
25019
|
const commentFilePath = Config$1.getInstance().getFirst(["reporter.coverage.github-pr-comment.comment-file-path"], "coverage/github.pr.coverage.md");
|
|
25015
25020
|
const annotationFilePath = Config$1.getInstance().getFirst(["reporter.coverage.github-pr-comment.annotation-file-path"], "coverage/github.pr.annotations.json");
|
|
25016
25021
|
let repoName = process.env.GITHUB_REPOSITORY || "";
|
|
@@ -25133,7 +25138,9 @@ class GithubPRCommentCoverageReporter {
|
|
|
25133
25138
|
head_sha: diffCoverage.headSha,
|
|
25134
25139
|
status: "completed",
|
|
25135
25140
|
conclusion: qualityGateFailed
|
|
25136
|
-
?
|
|
25141
|
+
? failActionOnQualityGate
|
|
25142
|
+
? "failure"
|
|
25143
|
+
: "neutral"
|
|
25137
25144
|
: qualityGateWarning
|
|
25138
25145
|
? "neutral"
|
|
25139
25146
|
: "success",
|
|
@@ -54478,8 +54485,9 @@ class DiffCoverageCommand {
|
|
|
54478
54485
|
changedLineNumbers.add(line);
|
|
54479
54486
|
hunkLine++;
|
|
54480
54487
|
}
|
|
54481
|
-
changedLineCount += hunk.newLines;
|
|
54482
54488
|
}
|
|
54489
|
+
changedLineCount = changedLineNumbers.size;
|
|
54490
|
+
Logger.debug(`Changed line count for file ${normalizedPath}: ${changedLineCount}`);
|
|
54483
54491
|
let coveredLines = 0;
|
|
54484
54492
|
let coveredFunctions = 0;
|
|
54485
54493
|
let totalFunctions = 0;
|