mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-05 10:52:49 +00:00
fix autolabler regex
This commit is contained in:
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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user