mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-19 09:40:07 +00:00
Refactor autolabeler workflow to simplify steps
This commit is contained in:
parent
694d9c203e
commit
7ef8afe4d2
5
.github/workflows/autolabeler.yml
generated
vendored
5
.github/workflows/autolabeler.yml
generated
vendored
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user