@@ -8378,7 +8378,7 @@ const {
8378
8378
} = __nccwpck_require__(6480)
8379
8379
8380
8380
exports.prWorkflow = async function (owner, repo, columnId, projectName) {
8381
- const destBranch = core.getInput('branch');
8381
+ const destBranch = core.getInput('branch');
8382
8382
8383
8383
if (destBranch !== github.context.payload.pull_request.base.ref || github.context.payload.pull_request.base.merged === false) {
8384
8384
return;
@@ -8394,8 +8394,7 @@ exports.prWorkflow = async function (owner, repo, columnId, projectName) {
8394
8394
return;
8395
8395
}
8396
8396
const cursor = lastPRs.length === 1 ? false : lastPRs[0].cursor;
8397
-
8398
- let issues = (await findAllNestedPullRequestsIssues(owner, repo, destBranch, cursor));
8397
+ let issues = (await findAllNestedPullRequestsIssues(owner, repo, destBranch, cursor)).filter((v, i, a) => a.findIndex(v2 => (v2.id === v.id)) === i);
8399
8398
8400
8399
if (issues.length === 0) {
8401
8400
console.log(`Not found any issues related to current PR and all children PRs`);
@@ -8468,6 +8467,7 @@ async function lastPullRequests(owner, repo, destinationBranch) {
8468
8467
const findAllNestedPullRequestsIssues = async (owner, repo, destinationBranch, endCursor) => {
8469
8468
let issues = [];
8470
8469
let pullRequests = await findAllNestedPullRequests(owner, repo, destinationBranch, endCursor);
8470
+
8471
8471
if (pullRequests.length) {
8472
8472
for (let i = 0; i < pullRequests.length; i++) {
8473
8473
let {closingIssuesReferences: {edges: refIssues}} = pullRequests[i].node;
@@ -8477,7 +8477,7 @@ const findAllNestedPullRequestsIssues = async (owner, repo, destinationBranch, e
8477
8477
}
8478
8478
}
8479
8479
let results = await findAllNestedPullRequestsIssues(owner, repo, pullRequests[i].node.headRefName, endCursor);
8480
- return [...issues, ...results];
8480
+ issues = [...issues, ...results];
8481
8481
}
8482
8482
}
8483
8483
0 commit comments