1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-16 15:31:53 +00:00

Fix Workflow (#3387)

This commit is contained in:
Michel Roegl-Brunner 2025-03-24 15:28:39 +01:00 committed by GitHub
parent 7d0f60c8d1
commit b1f51e2d34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,36 +107,38 @@ jobs:
for (const pr of filteredPRs) {
const prLabels = pr.labels.map(label => label.name.toLowerCase());
let prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
if (pr.user.login.includes("push-app-to-main[bot]")) {
const scriptName = pr.title;
try {
const { data: relatedIssues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: "ProxmoxVED",
state: "all",
labels: ["Started Migration To ProxmoxVE"],
per_page: 5
labels: ["Started Migration To ProxmoxVE"]
});
const matchingIssue = relatedIssues.find(issue =>
issue.title.toLowerCase().includes(scriptName.toLowerCase())
);
if (matchingIssue) {
const issueAuthor = matchingIssue.user.login;
const issueAuthorUrl = `https://github.com/${issueAuthor}`;
prNote = `- ${pr.title} [@${issueAuthor}](${issueAuthorUrl}) ([#${pr.number}](${pr.html_url}))`;
}
else {
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
}
} catch (error) {
console.error(`Error fetching related issues: ${error}`);
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
}
}else{
prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
}
if (prLabels.includes("new script")) {
const newScriptCategory = categorizedPRs.find(category =>
category.title === "New Scripts" || category.labels.includes("new script"));
@ -174,7 +176,7 @@ jobs:
}
return await main();
- name: Update CHANGELOG.md
uses: actions/github-script@v7
with: