Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30564,7 +30564,7 @@ const createComment = (analyze, test, coverage, behindBy) => {
<li>✅ - Linting / Formatting</li>
<li>${analyze.output.replaceAll("`|\"|'|<|>", "")}</li>
<li>${test.output.replaceAll("`|\"|'|<|>", "")}</li>
${isSuccess ? "<li>✅ - Branch is not behind" : null}
${isSuccess ? "<li>✅ - Branch is not behind</li>" : ""}
<li>${coverage.output.replaceAll("`|\"|'|<|>", "")}</li>
</ul>

Expand Down Expand Up @@ -30809,6 +30809,8 @@ const getTest = async () => {
else if (entry4) {
testDetails = entry4.error;
}
testDetails = testDetails.replace(/(?:\r\n|\r|\n)/g, "<br>");
testDetails = testDetails.replace(/(?:<>'"`)/g, "");
errorString.push("<details><summary>" + testName + "</br></summary>`" + testDetails + "`</details>");
});
const output = `⛔️ - ${initialString}</br >
Expand Down Expand Up @@ -33151,7 +33153,7 @@ const run = async () => {
const oldCoverage = (0, coverage_1.getOldCoverage)();
const analyzeStr = await (0, analyze_1.getAnalyze)();
const testStr = await (0, runTests_1.getTest)();
const coverageStr = await (0, coverage_1.getCoverage)(oldCoverage);
const coverageStr = (0, coverage_1.getCoverage)(oldCoverage);
const comment = (0, comment_1.createComment)(analyzeStr, testStr, coverageStr, behindByStr);
(0, comment_1.postComment)(octokit, comment, github_1.context);
await (0, push_1.push)();
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const run = async () => {

const analyzeStr: stepResponse = await getAnalyze();
const testStr: stepResponse = await getTest();
const coverageStr: stepResponse = await getCoverage(oldCoverage);
const coverageStr: stepResponse = getCoverage(oldCoverage);

const comment = createComment(analyzeStr, testStr, coverageStr, behindByStr);

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const createComment = (
<li>✅ - Linting / Formatting</li>
<li>${analyze.output.replaceAll("`|\"|'|<|>", "")}</li>
<li>${test.output.replaceAll("`|\"|'|<|>", "")}</li>
${isSuccess ? "<li>✅ - Branch is not behind" : null}
${isSuccess ? "<li>✅ - Branch is not behind</li>" : ""}
<li>${coverage.output.replaceAll("`|\"|'|<|>", "")}</li>
</ul>

Expand Down
3 changes: 2 additions & 1 deletion src/scripts/runTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export const getTest = async (): Promise<stepResponse> => {
} else if (entry4) {
testDetails = entry4.error;
}

testDetails = testDetails.replace(/(?:\r\n|\r|\n)/g, "<br>");
testDetails = testDetails.replace(/(?:<>'"`)/g, "");
errorString.push("<details><summary>" + testName + "</br></summary>`" + testDetails + "`</details>");
});

Expand Down