diff --git a/src/main.ts b/src/main.ts index 95adb30..5f08761 100644 --- a/src/main.ts +++ b/src/main.ts @@ -69,6 +69,13 @@ async function run(): Promise { } return } + + if (hideOldComment) { + if (!previous) { + await minimizeComment(octokit, previous.id, hideClassify) + } + return + } if (!previous) { if (onlyUpdateComment) { @@ -85,11 +92,6 @@ async function run(): Promise { return } - if (hideOldComment) { - await minimizeComment(octokit, previous.id, hideClassify) - return - } - if (skipUnchanged && commentsEqual(body, previous.body || "", header)) { // don't recreate or update if the message is unchanged return