mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-20 01:56:28 +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
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# 🔹 Priority-Config laden (kompakt mit jq -c)
|
|
||||||
- name: Load priority config
|
- name: Load priority config
|
||||||
run: |
|
run: |
|
||||||
echo "PRIORITY_JSON=$(jq -c . .github/label-priority.json)" >> $GITHUB_ENV
|
echo "PRIORITY_JSON=$(jq -c . .github/label-priority.json)" >> $GITHUB_ENV
|
||||||
|
|
||||||
# 🔹 PR-Daten sammeln
|
|
||||||
- name: Fetch PR metadata
|
- name: Fetch PR metadata
|
||||||
id: pr
|
id: pr
|
||||||
uses: actions/github-script@v7
|
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'});
|
require('fs').writeFileSync(process.env.GITHUB_ENV, `PR_DATA=${JSON.stringify(prData)}\n`, {flag: 'a'});
|
||||||
|
|
||||||
# 🔹 AI-Analyse (OpenAI)
|
|
||||||
- name: AI Label Review
|
- name: AI Label Review
|
||||||
id: ai
|
id: ai
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
@ -153,7 +150,6 @@ jobs:
|
|||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const fetch = require("node-fetch");
|
|
||||||
const prData = JSON.parse(process.env.PR_DATA);
|
const prData = JSON.parse(process.env.PR_DATA);
|
||||||
|
|
||||||
const prompt = `
|
const prompt = `
|
||||||
@ -186,7 +182,6 @@ jobs:
|
|||||||
const labels = JSON.parse(data.choices[0].message.content).labels;
|
const labels = JSON.parse(data.choices[0].message.content).labels;
|
||||||
core.setOutput("labels", JSON.stringify(labels));
|
core.setOutput("labels", JSON.stringify(labels));
|
||||||
|
|
||||||
# 🔹 Labels anwenden + unsichere vorschlagen
|
|
||||||
- name: Apply AI Labels
|
- name: Apply AI Labels
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user