diff --git a/src/scripts/analyze.ts b/src/scripts/analyze.ts index 5307c8f..ebbf388 100644 --- a/src/scripts/analyze.ts +++ b/src/scripts/analyze.ts @@ -13,8 +13,12 @@ const runCommand = async ( if (error instanceof Error) { debug(`${label} failed: ${error.message}`); return error.message; + } else if (typeof error === "string") { + debug(`${label} failed: ${error}`); + return error; + } else { + return true; } - return true; } }; diff --git a/src/scripts/comment.ts b/src/scripts/comment.ts index 70b79f3..f8541da 100644 --- a/src/scripts/comment.ts +++ b/src/scripts/comment.ts @@ -12,10 +12,10 @@ export const comment = async ( ): Promise => { try { const commentBody = ` - ## PR Checks Complete\n - ${analyzeStr?.output}\n - ${codeFormattingStr?.output}\n - ${testingStr?.output}\n`; +## PR Checks Complete\n +${analyzeStr?.output}\n +${codeFormattingStr?.output}\n +${testingStr?.output}\n`; // ## Coverage = ${coverageStr?.output}\n` await ocotokit.rest.issues.createComment({ diff --git a/src/scripts/testing.ts b/src/scripts/testing.ts index fd061cb..ab1bbe2 100644 --- a/src/scripts/testing.ts +++ b/src/scripts/testing.ts @@ -5,7 +5,7 @@ import { stepResponse } from "src/main"; export const testing = async (): Promise => { try { // Run tests and generate coverage - await exec("npm run test -- --coverage --debug"); + await exec("npm run test -- --coverage"); // Test tsdoc await exec("npm run docs");