fix autolabler regex
This commit is contained in:
parent
3b7036ae58
commit
42e8623f39
2
.github/workflows/autolabeler.yml
generated
vendored
2
.github/workflows/autolabeler.yml
generated
vendored
@ -80,7 +80,7 @@ jobs:
|
|||||||
|
|
||||||
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
||||||
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
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)) {
|
if (regex.test(prBody)) {
|
||||||
labelsToAdd.add(label);
|
labelsToAdd.add(label);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user