mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-03-08 13:19:05 +00:00
Update autolabeler.yml
This commit is contained in:
parent
c72e8d3da6
commit
5de3075252
7
.github/workflows/autolabeler.yml
vendored
7
.github/workflows/autolabeler.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
const autolabelerConfig = JSON.parse(fileContent);
|
const autolabelerConfig = JSON.parse(fileContent);
|
||||||
|
|
||||||
const prNumber = context.payload.pull_request.number;
|
const prNumber = context.payload.pull_request.number;
|
||||||
const prBody = context.payload.pull_request.body.toLowerCase();
|
const prBody = context.payload.pull_request.body;
|
||||||
|
|
||||||
// Label-Sammlung (um doppelte API-Calls zu vermeiden)
|
// Label-Sammlung (um doppelte API-Calls zu vermeiden)
|
||||||
let labelsToAdd = new Set();
|
let labelsToAdd = new Set();
|
||||||
@ -70,9 +70,8 @@ jobs:
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
||||||
const regex = new RegExp(`- \\[(.*?)\\] ${checkbox}`, "i");
|
const regex = new RegExp(`- \\[x\\] ${checkbox}`, "i"); // Match only checked checkboxes
|
||||||
const match = prBody.match(regex);
|
if (regex.test(prBody)) {
|
||||||
if (match && match[1].trim() !== "") { // Checkbox ist gesetzt
|
|
||||||
labelsToAdd.add(label);
|
labelsToAdd.add(label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user