ci: support 8-character short hash in validate-form workflow

This commit is contained in:
sxyazi 2025-03-02 03:14:48 +08:00
parent 57ef8f9ebd
commit 66f015de95
No known key found for this signature in database

View file

@ -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
}