From 5de3075252431d0ddb166c2246c0be535a198f7e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:03:37 +0100 Subject: [PATCH] Update autolabeler.yml --- .github/workflows/autolabeler.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index d0ebbcc25..d39abed76 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -32,7 +32,7 @@ jobs: const autolabelerConfig = JSON.parse(fileContent); 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) let labelsToAdd = new Set(); @@ -70,9 +70,8 @@ jobs: }; for (const [checkbox, label] of Object.entries(templateLabelMappings)) { - const regex = new RegExp(`- \\[(.*?)\\] ${checkbox}`, "i"); - const match = prBody.match(regex); - if (match && match[1].trim() !== "") { // Checkbox ist gesetzt + const regex = new RegExp(`- \\[x\\] ${checkbox}`, "i"); // Match only checked checkboxes + if (regex.test(prBody)) { labelsToAdd.add(label); } }