mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-29 09:23:08 +00:00
Update autolabeler.yml
This commit is contained in:
parent
9756ac639b
commit
d380fdd0ea
12
.github/workflows/autolabeler.yml
vendored
12
.github/workflows/autolabeler.yml
vendored
@ -13,20 +13,26 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CONFIG_PATH: .github/autolabeler-config.json
|
CONFIG_PATH: .github/autolabeler-config.json
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Label PR based on config rules
|
- name: Label PR based on config rules
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs').promises;
|
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;
|
let config;
|
||||||
try {
|
try {
|
||||||
const fileContent = await fs.readFile(configPath, 'utf-8');
|
const fileContent = await fs.readFile(configPath, 'utf-8');
|
||||||
config = JSON.parse(fileContent);
|
config = JSON.parse(fileContent);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`❌ Issue while load config file: ${error.message}`);
|
console.error(`❌ Fehler beim Laden der Konfigurationsdatei: ${error.message}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user