Skip to content

Commit

Permalink
Fix ID used to move issue on board (#10846)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac authored Apr 19, 2024
1 parent 6527564 commit 75c595f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/scripts/pr-gh-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ async function moveIssueToProjectState(project, prjIssueID, issue, state) {
console.log(`moveIssueToProjectState ${ state }`);
console.log(JSON.stringify(project, null, 2));
console.log(prjIssueID);
console.log(JSON.stringify(issue, null, 2));
// console.log(JSON.stringify(issue, null, 2));

return await request.ghUpdateProjectIssueStatus(project, prjIssueID, state);
const res = await request.ghUpdateProjectIssueStatus(project, prjIssueID, state);

console.log(JSON.stringify(res, null, 2));

return res;
}

/**
Expand Down Expand Up @@ -313,8 +317,7 @@ async function processOpenOrEditAction() {
const info = parseOrgAndRepo(iss.repository_url);
let prjIssue = await request.ghProjectIssue(info.org, info.repo, i);

console.log(info);

// console.log(info);
// console.log('-------- GH ISSUE -----');
// console.log(JSON.stringify(prjIssue, null, 2));
// console.log('---------');
Expand All @@ -338,7 +341,7 @@ async function processOpenOrEditAction() {
}

if (prjIssue?.[ghProject.id]) {
await moveIssueToProjectState(ghProject, prjIssue[ghProject.id].id, iss, GH_PRJ_IN_REVIEW);
await moveIssueToProjectState(ghProject, prjIssue[ghProject.id], iss, GH_PRJ_IN_REVIEW);
} else {
console.log(`Can not move issue to state ${ GH_PRJ_IN_REVIEW } - issue is not on the board`);
}
Expand Down

0 comments on commit 75c595f

Please sign in to comment.