File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,19 @@ jobs:
8686 per_page: 100,
8787 });
8888
89+ if (!pulls || pulls.length === 0) {
90+ console.log("⚠️ No merged PRs found. create empty Changelog.");
91+ core.setOutput("result", JSON.stringify([]));
92+ return;
93+ }
94+
8995 pulls.filter(pr =>
9096 pr.merged_at &&
9197 new Date(pr.merged_at) > latestDateInChangelog &&
9298 !pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()))
9399 ).forEach(pr => {
94100 const prLabels = pr.labels.map(label => label.name.toLowerCase());
95- const prBody = pr.body. toLowerCase();
101+ const prBody = pr.body ? pr.body. toLowerCase() : "" ;
96102 const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
97103
98104 // Mapping für PR-Checkboxen → Labels
@@ -113,7 +119,6 @@ jobs:
113119 }
114120 }
115121
116- // Unterteilung von "Updated Scripts"
117122 let categorized = false;
118123 for (const { labels, notes, title } of categorizedPRs) {
119124 if (labels.includes("update script") && labels.includes("bugfix")) {
@@ -136,7 +141,7 @@ jobs:
136141 }
137142
138143 if (addedByTemplate) {
139- console.log(`PR #${pr.number} wurde durch PR-Template-Kategorie hinzugefügt `);
144+ console.log(`PR #${pr.number} added by PR-Template category `);
140145 }
141146 });
142147
You can’t perform that action at this time.
0 commit comments