Skip to content

Commit

Permalink
fix: remove duplicate issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleytodd committed Mar 5, 2024
1 parent 968b2b4 commit 9ac31b3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions run.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const pkg = require('./package.json')
}
}

let agendaIssues = []
const agendaIssues = []
for (const r of repos) {
console.log(`Fetching issues for ${r.owner}/${r.repo}`)
const _agendaIssues = await client.paginate('GET /repos/{owner}/{repo}/issues', {
Expand All @@ -101,8 +101,14 @@ const pkg = require('./package.json')
state: 'open',
labels: agendaLabel
})
agendaIssues = agendaIssues.concat(_agendaIssues)
for (const i of _agendaIssues) {
if (!agendaIssues.find((ii) => ii.url === i.url)) {
agendaIssues.push(i)
break
}
}
}

const opts = {
...repo,
schedules,
Expand Down

0 comments on commit 9ac31b3

Please sign in to comment.