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:
parent
5aca671fad
commit
ef839acb12
23
.github/workflows/changelog-pr.yml
vendored
23
.github/workflows/changelog-pr.yml
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user