mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Update changelog-pr.yml
This commit is contained in:
		
							
								
								
									
										11
									
								
								.github/workflows/changelog-pr.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/changelog-pr.yml
									
									
									
									
										vendored
									
									
								
							@@ -86,13 +86,19 @@ jobs:
 | 
				
			|||||||
              per_page: 100,
 | 
					              per_page: 100,
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!pulls || pulls.length === 0) {
 | 
				
			||||||
 | 
					              console.log("⚠️ No merged PRs found. create empty Changelog.");
 | 
				
			||||||
 | 
					              core.setOutput("result", JSON.stringify([]));
 | 
				
			||||||
 | 
					              return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pulls.filter(pr => 
 | 
					            pulls.filter(pr => 
 | 
				
			||||||
              pr.merged_at && 
 | 
					              pr.merged_at && 
 | 
				
			||||||
              new Date(pr.merged_at) > latestDateInChangelog && 
 | 
					              new Date(pr.merged_at) > latestDateInChangelog && 
 | 
				
			||||||
              !pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()))
 | 
					              !pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()))
 | 
				
			||||||
            ).forEach(pr => {
 | 
					            ).forEach(pr => {
 | 
				
			||||||
              const prLabels = pr.labels.map(label => label.name.toLowerCase());
 | 
					              const prLabels = pr.labels.map(label => label.name.toLowerCase());
 | 
				
			||||||
              const prBody = pr.body.toLowerCase();
 | 
					              const prBody = pr.body ? pr.body.toLowerCase() : "";
 | 
				
			||||||
              const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
 | 
					              const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              // Mapping für PR-Checkboxen → Labels
 | 
					              // Mapping für PR-Checkboxen → Labels
 | 
				
			||||||
@@ -113,7 +119,6 @@ jobs:
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              // Unterteilung von "Updated Scripts"
 | 
					 | 
				
			||||||
              let categorized = false;
 | 
					              let categorized = false;
 | 
				
			||||||
              for (const { labels, notes, title } of categorizedPRs) {
 | 
					              for (const { labels, notes, title } of categorizedPRs) {
 | 
				
			||||||
                if (labels.includes("update script") && labels.includes("bugfix")) {
 | 
					                if (labels.includes("update script") && labels.includes("bugfix")) {
 | 
				
			||||||
@@ -136,7 +141,7 @@ jobs:
 | 
				
			|||||||
              }
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              if (addedByTemplate) {
 | 
					              if (addedByTemplate) {
 | 
				
			||||||
                console.log(`PR #${pr.number} wurde durch PR-Template-Kategorie hinzugefügt`);
 | 
					                console.log(`PR #${pr.number} added by PR-Template category`);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user