mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 22:08:07 +00:00
Fix Workflow (#3387)
This commit is contained in:
parent
7d0f60c8d1
commit
b1f51e2d34
16
.github/workflows/changelog-pr.yml
vendored
16
.github/workflows/changelog-pr.yml
vendored
@ -107,36 +107,38 @@ jobs:
|
|||||||
|
|
||||||
for (const pr of filteredPRs) {
|
for (const pr of filteredPRs) {
|
||||||
const prLabels = pr.labels.map(label => label.name.toLowerCase());
|
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]")) {
|
if (pr.user.login.includes("push-app-to-main[bot]")) {
|
||||||
|
|
||||||
const scriptName = pr.title;
|
const scriptName = pr.title;
|
||||||
try {
|
try {
|
||||||
const { data: relatedIssues } = await github.rest.issues.listForRepo({
|
const { data: relatedIssues } = await github.rest.issues.listForRepo({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: "ProxmoxVED",
|
repo: "ProxmoxVED",
|
||||||
state: "all",
|
state: "all",
|
||||||
labels: ["Started Migration To ProxmoxVE"],
|
labels: ["Started Migration To ProxmoxVE"]
|
||||||
per_page: 5
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const matchingIssue = relatedIssues.find(issue =>
|
const matchingIssue = relatedIssues.find(issue =>
|
||||||
issue.title.toLowerCase().includes(scriptName.toLowerCase())
|
issue.title.toLowerCase().includes(scriptName.toLowerCase())
|
||||||
);
|
);
|
||||||
|
|
||||||
if (matchingIssue) {
|
if (matchingIssue) {
|
||||||
const issueAuthor = matchingIssue.user.login;
|
const issueAuthor = matchingIssue.user.login;
|
||||||
const issueAuthorUrl = `https://github.com/${issueAuthor}`;
|
const issueAuthorUrl = `https://github.com/${issueAuthor}`;
|
||||||
prNote = `- ${pr.title} [@${issueAuthor}](${issueAuthorUrl}) ([#${pr.number}](${pr.html_url}))`;
|
prNote = `- ${pr.title} [@${issueAuthor}](${issueAuthorUrl}) ([#${pr.number}](${pr.html_url}))`;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error fetching related issues: ${error}`);
|
console.error(`Error fetching related issues: ${error}`);
|
||||||
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
|
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")) {
|
if (prLabels.includes("new script")) {
|
||||||
const newScriptCategory = categorizedPRs.find(category =>
|
const newScriptCategory = categorizedPRs.find(category =>
|
||||||
category.title === "New Scripts" || category.labels.includes("new script"));
|
category.title === "New Scripts" || category.labels.includes("new script"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user