Skip to content

Commit 5de3075

Browse files
authored
Update autolabeler.yml
1 parent c72e8d3 commit 5de3075

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/autolabeler.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
const autolabelerConfig = JSON.parse(fileContent);
3333
3434
const prNumber = context.payload.pull_request.number;
35-
const prBody = context.payload.pull_request.body.toLowerCase();
35+
const prBody = context.payload.pull_request.body;
3636
3737
// Label-Sammlung (um doppelte API-Calls zu vermeiden)
3838
let labelsToAdd = new Set();
@@ -70,9 +70,8 @@ jobs:
7070
};
7171
7272
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
73-
const regex = new RegExp(`- \\[(.*?)\\] ${checkbox}`, "i");
74-
const match = prBody.match(regex);
75-
if (match && match[1].trim() !== "") { // Checkbox ist gesetzt
73+
const regex = new RegExp(`- \\[x\\] ${checkbox}`, "i"); // Match only checked checkboxes
74+
if (regex.test(prBody)) {
7675
labelsToAdd.add(label);
7776
}
7877
}

0 commit comments

Comments
 (0)