Skip to content

Commit

Permalink
fix targeted issue
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-heyer committed Mar 6, 2024
1 parent 8e092fb commit 74c9494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/automation/actions/jira-sync/jira.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function loadGHIssues(issueNumber) {
let ret = issues.data.filter((i) => !i.pull_request);

// if there's a "target" issue, make sure to include that
if (issueNumber) {
if (issueNumber && !ret.some((i) => i.number === issueNumber)) {
let issue = await octokit.request(
"GET /repos/{owner}/{repo}/issues/{issue_number}",
{
Expand All @@ -113,7 +113,7 @@ async function loadGHIssues(issueNumber) {
},
);

if (issue) ret.push(issue);
if (issue?.data) ret.push(issue.data);
}

return ret;
Expand Down

0 comments on commit 74c9494

Please sign in to comment.