From 9cc17f1338f522e2e2ddd91f1b110e6fd3fce897 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Thu, 18 Apr 2024 10:24:17 +0200 Subject: [PATCH] Bug fix for adding issue to the GH Project board (#10830) --- .github/workflows/scripts/pr-gh-project.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/pr-gh-project.js b/.github/workflows/scripts/pr-gh-project.js index 5dcb01fc76..91303c2bd2 100644 --- a/.github/workflows/scripts/pr-gh-project.js +++ b/.github/workflows/scripts/pr-gh-project.js @@ -320,7 +320,7 @@ async function processOpenOrEditAction() { console.log('---------'); // Is the issue on the board? - if (!prjIssue[ghProject.id]) { + if (!prjIssue || !prjIssue[ghProject.id]) { // Issue is not on the board console.log(`Issue ${ i } is NOT on the project board - adding it ...`); @@ -328,7 +328,7 @@ async function processOpenOrEditAction() { prjIssue = await request.ghProjectIssue(info.org, info.repo, i.number); - if (!prjIssue[ghProject.id]) { + if (!prjIssue || !prjIssue[ghProject.id]) { console.log("Error: Could not add issue to Project Board"); console.log(prjIssue); } else {