diff --git a/.github/scripts/validate.js b/.github/scripts/validate.js index 78ed733c96..fcc6713291 100644 --- a/.github/scripts/validate.js +++ b/.github/scripts/validate.js @@ -267,11 +267,15 @@ const hidePreviousComments = async ({github, context}) => { issue_number: context.payload.issue.number, }); - const botComments = comments.data.filter( - (comment) => comment.user.type === 'Bot', + // Filter for bot comments that aren't already hidden + const unhiddenBotComments = comments.data.filter( + (comment) => + comment.user.type === 'Bot' && + !comment.body.includes('
') && + !comment.body.includes('Previous bot comment') ); - for (const comment of botComments) { + for (const comment of unhiddenBotComments) { // Don't format string - it will broke the markdown const hiddenBody = `