1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-22 22:18: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 { } else {
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`; prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
} }
}
const updateScriptsCategory = categorizedPRs.find(category => // Find matching category
category.labels.some(label => prLabels.includes(label)) for (const category of categorizedPRs) {
); if (category.labels.some(label => prLabels.includes(label))) {
// Check if PR belongs to a subcategory
if (updateScriptsCategory) { if (category.subCategories && category.subCategories.length > 0) {
const subCategory = updateScriptsCategory.subCategories.find(sub => const subCategory = category.subCategories.find(sub =>
sub.labels.some(label => prLabels.includes(label)) sub.labels.some(label => prLabels.includes(label))
); );
if (subCategory) { if (subCategory) {
subCategory.notes.push(prNote); subCategory.notes.push(prNote);
} else { } else {
updateScriptsCategory.notes.push(prNote); category.notes.push(prNote);
}
} else {
category.notes.push(prNote);
}
} }
} }
} }
return categorizedPRs;
}
return await main();
- name: Update CHANGELOG.md - name: Update CHANGELOG.md
uses: actions/github-script@v7 uses: actions/github-script@v7