From 66f015de9588c6aaf6c4a3b1654ac956a04e149f Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 2 Mar 2025 03:14:48 +0800 Subject: [PATCH] ci: support 8-character short hash in `validate-form` workflow --- scripts/validate-form/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate-form/main.js b/scripts/validate-form/main.js index 45362ff2..fb1655c4 100644 --- a/scripts/validate-form/main.js +++ b/scripts/validate-form/main.js @@ -4,7 +4,7 @@ const RE_DEPENDENCIES = /Dependencies\s+[/a-z]+\s*:\s/gm const RE_CHECKLIST = /#{3}\s+Checklist\s+(?:^-\s+\[x]\s+.+?(?:\n|\r\n|$)){2}/gm function bugReportBody(creator, content, hash) { - if (content.includes(` (${hash} `) && RE_CHECKLIST.test(content)) { + if (RE_CHECKLIST.test(content) && new RegExp(` \\(${hash}[a-z]? `).test(content)) { return null }