Skip to content

Commit

Permalink
refactor imports in main.ts and testing.ts and update comment search …
Browse files Browse the repository at this point in the history
…logic in comment.ts for improved clarity
  • Loading branch information
DE7924 committed Dec 12, 2024
1 parent 7d95ca3 commit a5c745a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { analyze } from "./scripts/analyze";
import { formatting } from "./scripts/formatting";
import { testing } from "./scripts/testing";
import { comment } from "./scripts/comment";
import { cwd, chdir, listeners } from "process";
import { cwd, chdir } from "process";
// import { coverage } from './scripts/coverage'
import minimist from "minimist";

Expand Down
6 changes: 3 additions & 3 deletions src/scripts/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ ${testingStr?.output}
owner: context.repo.owner,
repo: context.repo.repo,
});
const comment = comments.find((comment) =>
comment.body!.includes("PR Checks Complete"),
);
const comment = comments.find((comment) => {
if (comment.body) comment.body.includes("PR Checks Complete");
});
if (comment) {
await ocotokit.rest.issues.updateComment({
comment_id: comment.id,
Expand Down
1 change: 0 additions & 1 deletion src/scripts/testing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { exec } from "@actions/exec";
import { setFailed } from "@actions/core";
import { stepResponse, failedEmoji, passedEmoji, runCommand } from "src/main";

Expand Down

0 comments on commit a5c745a

Please sign in to comment.