(prs: WithClosingIssues[])
| 485 | // Deduplicate (and sort asc) the closing issue numbers across all PRs. |
| 486 | // (a single issue can be closed by more than one PR across the range) |
| 487 | export function collectIssues(prs: WithClosingIssues[]): number[] { |
| 488 | const numbers = new Set<number>() |
| 489 | for (const pr of prs) { |
| 490 | for (const { node } of pr.closingIssuesReferences.edges) { |
| 491 | numbers.add(node.number) |
| 492 | } |
| 493 | } |
| 494 | return Array.from(numbers).sort((a, b) => a - b) |
| 495 | } |
| 496 | |
| 497 | // The candidate numbers to probe as discussions: a target reference is one only if |
| 498 | // GitHub didn't already resolve it as a closing issue (those are handled directly) |
no outgoing calls