Skip to content

Commit b20aaaa

Browse files
committed
🚧 Tweak more stuff
1 parent 74e373b commit b20aaaa

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

action/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

action/run.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ export const run = async (): Promise<void> => {
6565
output: {
6666
title: `${coverage}% Coverage`,
6767
summary: String.raw`The following is the Typescript Coverage Report for this Pull Request
68-
6968
### Indicators
70-
7169
🟥 -> Indcates that the file has failed the type threshold (90%)
7270
`,
7371
text: markdownReport

src/lib/reporters/markdown.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const generate = (
2828
): string => {
2929
let row = 1;
3030
const headers = [
31+
"status",
3132
"filenames" + ` (${fileCounts.size})`.gray,
3233
"percent" + ` (${percentage.toFixed(2)}%)`.gray,
3334
"total" + ` (${total})`.gray,
@@ -61,16 +62,16 @@ export const generate = (
6162
calculatePercantage(correctCount, totalCount)
6263
);
6364

64-
let hyperlinedFileName = `[\`${filename}\`](${baseURL}/${filename})`;
65+
const thresholdPassed = fileTypePercentage >= threshold;
66+
67+
const hyperlinedFileName = `[\`${filename}\`](${baseURL}/${filename})`;
6568

6669
/**
6770
* Insert a 🟥 to indicate that this file has failed the threshold
71+
* or insert a 🟩
6872
*/
69-
if (fileTypePercentage < threshold) {
70-
hyperlinedFileName = "🟥 " + hyperlinedFileName;
71-
}
72-
7373
coverageTableArray.push([
74+
thresholdPassed ? "🟩" : "🟥",
7475
hyperlinedFileName,
7576
calculatePercantageWithString(correctCount, totalCount),
7677
totalCount.toString(),

0 commit comments

Comments
 (0)