chore(github): improve PR template and cleanup obsolete references | move contribution guide (#9700)

This commit is contained in:
CanbiZ
2025-12-05 23:08:58 +01:00
committed by GitHub
parent 89595627a6
commit 0c2521c05e
17 changed files with 238 additions and 1130 deletions

33
.github/workflows/changelog-pr.yml generated vendored
View File

@@ -157,13 +157,31 @@ jobs:
let categorized = false;
const priorityCategories = categorizedPRs.slice();
// Priority order for content-type labels (highest priority first)
const subCategoryPriority = ["breaking change", "bugfix", "feature", "refactor"];
for (const category of priorityCategories) {
if (categorized) break;
if (category.labels.some(label => prLabels.includes(label))) {
if (category.subCategories && category.subCategories.length > 0) {
const subCategory = category.subCategories.find(sub =>
sub.labels.some(label => prLabels.includes(label))
);
// Find subcategory by priority order instead of first match
let subCategory = null;
for (const priorityLabel of subCategoryPriority) {
if (prLabels.includes(priorityLabel)) {
subCategory = category.subCategories.find(sub =>
sub.labels.includes(priorityLabel)
);
if (subCategory) break;
}
}
// Fallback: check for any other subcategory match (api, github, json, etc.)
if (!subCategory) {
subCategory = category.subCategories.find(sub =>
sub.labels.some(label => prLabels.includes(label))
);
}
if (subCategory) {
subCategory.notes.push(prNote);
@@ -176,6 +194,15 @@ jobs:
categorized = true;
}
}
// Fallback: Add to Uncategorized if no category matched
if (!categorized) {
const uncategorized = categorizedPRs.find(category =>
category.title.includes("Uncategorized") || category.labels.includes("needs triage"));
if (uncategorized) {
uncategorized.notes.push(prNote);
}
}
}
}