From d380fdd0ea2dff70d57ac5fa9ac778fd8f4dfd71 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 10 Feb 2025 14:50:04 +0100 Subject: [PATCH] Update autolabeler.yml --- .github/workflows/autolabeler.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 2f66f3417..175572716 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -13,20 +13,26 @@ jobs: env: CONFIG_PATH: .github/autolabeler-config.json steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Label PR based on config rules uses: actions/github-script@v7 with: script: | const fs = require('fs').promises; - const { minimatch } = require('minimatch'); + const path = require('path'); - const configPath = process.env.CONFIG_PATH; + // `require.resolve()` sorgt dafür, dass `minimatch` aus der GitHub-Umgebung geladen wird. + const minimatch = require(require.resolve("minimatch")); + + const configPath = path.resolve(process.env.CONFIG_PATH); let config; try { const fileContent = await fs.readFile(configPath, 'utf-8'); config = JSON.parse(fileContent); } catch (error) { - console.error(`❌ Issue while load config file: ${error.message}`); + console.error(`❌ Fehler beim Laden der Konfigurationsdatei: ${error.message}`); return; }