From 58dfa885c2836f5025352fdcad9bcaa15664ab1a Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Mon, 24 Mar 2025 15:23:34 +0100 Subject: [PATCH] Workflow Update --- .github/workflows/changelog-pr.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/changelog-pr.yaml b/.github/workflows/changelog-pr.yaml index 5b5c0b5..5a0eb7d 100644 --- a/.github/workflows/changelog-pr.yaml +++ b/.github/workflows/changelog-pr.yaml @@ -108,7 +108,7 @@ jobs: for (const pr of filteredPRs) { const prLabels = pr.labels.map(label => label.name.toLowerCase()); if (pr.user.login.includes("push-app-to-main[bot]")) { - console.log("Bot detected"); + const scriptName = pr.title; try { const { data: relatedIssues } = await github.rest.issues.listForRepo({ @@ -116,13 +116,13 @@ jobs: repo: "ProxmoxVED", state: "all", labels: ["Started Migration To ProxmoxVE"] - + per_page: 1 }); - console.log("Related issues", relatedIssues); + const matchingIssue = relatedIssues.find(issue => issue.title.toLowerCase().includes(scriptName.toLowerCase()) ); - console.log("Matching issue", matchingIssue); + if (matchingIssue) { const issueAuthor = matchingIssue.user.login; const issueAuthorUrl = `https://github.com/${issueAuthor}`;