fix autolabler regex

This commit is contained in:
CanbiZ
2025-07-09 07:38:29 +02:00
committed by GitHub
parent 3b7036ae58
commit 42e8623f39

2
.github/workflows/autolabeler.yml generated vendored
View File

@ -80,7 +80,7 @@ jobs:
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
const regex = new RegExp(`- \[(x|X)\]\s*.*${escapedCheckbox}`, "i");
const regex = new RegExp(`- \\[(x|X)\\]\\s*${escapedCheckbox}`, "i");
if (regex.test(prBody)) {
labelsToAdd.add(label);
}