diff --git a/.github/workflows/validate-scripts.yml b/.github/workflows/validate-scripts.yml index 938501c3..d0e12923 100644 --- a/.github/workflows/validate-scripts.yml +++ b/.github/workflows/validate-scripts.yml @@ -186,7 +186,11 @@ jobs: newCommentBody += ':x: We found issues in the following changed files:\n\n'; for (const [check, files] of Object.entries(nonCompliantFiles)) { if (files) { - newCommentBody += `**${check}:**\n${files.trim().split(' ').map(file => `- ${file}`).join('\n')}\n\n`; + newCommentBody += `**${check}:**\n`; + files.trim().split(' ').forEach(file => { + newCommentBody += `- ${file}: ${check}\n`; + }); + newCommentBody += `\n`; } } } else { @@ -205,7 +209,7 @@ jobs: if (existingComment) { if (existingComment.body.includes(commentIdentifier)) { - const re = new RegExp(String.raw`[\s\S]*?`, ""); + const re = new RegExp(String.raw`[\\s\\S]*?`, ""); newCommentBody = existingComment.body.replace(re, newCommentBody); } else { newCommentBody = existingComment.body + '\n\n---\n\n' + newCommentBody;