Skip to content

Commit 92a5f77

Browse files
committed
Update changelog-pr.yml
1 parent 03c9152 commit 92a5f77

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/changelog-pr.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,25 +133,25 @@ jobs:
133133
console.error(`Error fetching related issues: ${error}`);
134134
}
135135
} else {
136-
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`; // ❗ `const` entfernt, da `prNote` schon oben existiert
136+
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
137137
}
138138
139-
const updateScriptsCategory = categorizedPRs.find(category =>
140-
category.labels.some(label => prLabels.includes(label))
141-
);
142-
143-
if (updateScriptsCategory) {
144-
const subCategory = updateScriptsCategory.subCategories.find(sub =>
145-
sub.labels.some(label => prLabels.includes(label))
139+
const updateScriptsCategory = categorizedPRs.find(category =>
140+
category.labels.some(label => prLabels.includes(label))
146141
);
147-
148-
if (subCategory) {
149-
subCategory.notes.push(prNote);
150-
} else {
151-
updateScriptsCategory.notes.push(prNote);
142+
143+
if (updateScriptsCategory) {
144+
const subCategory = updateScriptsCategory.subCategories.find(sub =>
145+
sub.labels.some(label => prLabels.includes(label))
146+
);
147+
148+
if (subCategory) {
149+
subCategory.notes.push(prNote);
150+
} else {
151+
updateScriptsCategory.notes.push(prNote);
152+
}
152153
}
153-
}
154-
}
154+
155155
156156
- name: Update CHANGELOG.md
157157
uses: actions/github-script@v7

0 commit comments

Comments
 (0)