Skip to content

Commit a5c745a

Browse files
committed
refactor imports in main.ts and testing.ts and update comment search logic in comment.ts for improved clarity
1 parent 7d95ca3 commit a5c745a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { analyze } from "./scripts/analyze";
55
import { formatting } from "./scripts/formatting";
66
import { testing } from "./scripts/testing";
77
import { comment } from "./scripts/comment";
8-
import { cwd, chdir, listeners } from "process";
8+
import { cwd, chdir } from "process";
99
// import { coverage } from './scripts/coverage'
1010
import minimist from "minimist";
1111

src/scripts/comment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ ${testingStr?.output}
2525
owner: context.repo.owner,
2626
repo: context.repo.repo,
2727
});
28-
const comment = comments.find((comment) =>
29-
comment.body!.includes("PR Checks Complete"),
30-
);
28+
const comment = comments.find((comment) => {
29+
if (comment.body) comment.body.includes("PR Checks Complete");
30+
});
3131
if (comment) {
3232
await ocotokit.rest.issues.updateComment({
3333
comment_id: comment.id,

src/scripts/testing.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { exec } from "@actions/exec";
21
import { setFailed } from "@actions/core";
32
import { stepResponse, failedEmoji, passedEmoji, runCommand } from "src/main";
43

0 commit comments

Comments
 (0)