mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-03-08 13:19:05 +00:00
Update autolabeler.yml
This commit is contained in:
parent
5de3075252
commit
8c41fb692b
5
.github/workflows/autolabeler.yml
vendored
5
.github/workflows/autolabeler.yml
vendored
@ -34,10 +34,8 @@ jobs:
|
|||||||
const prNumber = context.payload.pull_request.number;
|
const prNumber = context.payload.pull_request.number;
|
||||||
const prBody = context.payload.pull_request.body;
|
const prBody = context.payload.pull_request.body;
|
||||||
|
|
||||||
// Label-Sammlung (um doppelte API-Calls zu vermeiden)
|
|
||||||
let labelsToAdd = new Set();
|
let labelsToAdd = new Set();
|
||||||
|
|
||||||
// Prüfe Datei-Änderungen
|
|
||||||
const prListFilesResponse = await github.rest.pulls.listFiles({
|
const prListFilesResponse = await github.rest.pulls.listFiles({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@ -61,7 +59,6 @@ jobs:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prüfe PR-Template Checkboxen mit den korrekten Labels
|
|
||||||
const templateLabelMappings = {
|
const templateLabelMappings = {
|
||||||
"🐞 bug fix": "bugfix",
|
"🐞 bug fix": "bugfix",
|
||||||
"✨ new feature": "feature",
|
"✨ new feature": "feature",
|
||||||
@ -76,10 +73,8 @@ jobs:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugging: Anzeigen, welche Labels tatsächlich erkannt wurden
|
|
||||||
console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`);
|
console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`);
|
||||||
|
|
||||||
// Labels setzen, falls neue erkannt wurden
|
|
||||||
if (labelsToAdd.size > 0) {
|
if (labelsToAdd.size > 0) {
|
||||||
console.log(`Adding labels ${Array.from(labelsToAdd).join(", ")} to PR ${prNumber}`);
|
console.log(`Adding labels ${Array.from(labelsToAdd).join(", ")} to PR ${prNumber}`);
|
||||||
await github.rest.issues.addLabels({
|
await github.rest.issues.addLabels({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user