1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-22 18:58:07 +00:00

Update changelog-pr.yml

This commit is contained in:
CanbiZ 2025-03-24 12:46:44 +01:00
parent 5aca671fad
commit ef839acb12

View File

@ -135,24 +135,33 @@ jobs:
} else {
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
}
}
const updateScriptsCategory = categorizedPRs.find(category =>
category.labels.some(label => prLabels.includes(label))
);
if (updateScriptsCategory) {
const subCategory = updateScriptsCategory.subCategories.find(sub =>
// Find matching category
for (const category of categorizedPRs) {
if (category.labels.some(label => prLabels.includes(label))) {
// Check if PR belongs to a subcategory
if (category.subCategories && category.subCategories.length > 0) {
const subCategory = category.subCategories.find(sub =>
sub.labels.some(label => prLabels.includes(label))
);
if (subCategory) {
subCategory.notes.push(prNote);
} else {
updateScriptsCategory.notes.push(prNote);
category.notes.push(prNote);
}
} else {
category.notes.push(prNote);
}
}
}
}
return categorizedPRs;
}
return await main();
- name: Update CHANGELOG.md
uses: actions/github-script@v7