Refactor autolabeler workflow to simplify steps

This commit is contained in:
CanbiZ 2025-09-18 12:06:04 +02:00 committed by GitHub
parent 694d9c203e
commit 7ef8afe4d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

5
.github/workflows/autolabeler.yml generated vendored
View File

@ -121,12 +121,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
# 🔹 Priority-Config laden (kompakt mit jq -c)
- name: Load priority config
run: |
echo "PRIORITY_JSON=$(jq -c . .github/label-priority.json)" >> $GITHUB_ENV
# 🔹 PR-Daten sammeln
- name: Fetch PR metadata
id: pr
uses: actions/github-script@v7
@ -145,7 +143,6 @@ jobs:
};
require('fs').writeFileSync(process.env.GITHUB_ENV, `PR_DATA=${JSON.stringify(prData)}\n`, {flag: 'a'});
# 🔹 AI-Analyse (OpenAI)
- name: AI Label Review
id: ai
uses: actions/github-script@v7
@ -153,7 +150,6 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
script: |
const fetch = require("node-fetch");
const prData = JSON.parse(process.env.PR_DATA);
const prompt = `
@ -186,7 +182,6 @@ jobs:
const labels = JSON.parse(data.choices[0].message.content).labels;
core.setOutput("labels", JSON.stringify(labels));
# 🔹 Labels anwenden + unsichere vorschlagen
- name: Apply AI Labels
uses: actions/github-script@v7
with: