Context
Copilot review on PR #22 (comment) identified that fetchIssueRelationships discards all successfully fetched relationships when a mid-batch error occurs.
The try/catch wraps the entire batch loop, so if batch N fails, results from batches 1..N-1 are thrown away and an empty Map is returned.
Implementation Plan
- Move
try/catch from around the entire for loop to inside the loop body in src/index.ts (fetchIssueRelationships, lines ~415-460)
- On
"doesn't exist on type" error: break out of the loop (the sub-issues API is unavailable — no point continuing)
- On other errors (transient/network):
core.warning per-batch, then continue to the next batch
- Return the accumulated
relationships map (partial results) instead of new Map()
- Update tests in
src/__tests__/unit/index.test.ts: add a multi-batch test where batch 1 succeeds and batch 2 fails, and assert that partial results from batch 1 are returned
- Rebuild dist via
npm run package
Context
Copilot review on PR #22 (comment) identified that
fetchIssueRelationshipsdiscards all successfully fetched relationships when a mid-batch error occurs.The
try/catchwraps the entire batch loop, so if batch N fails, results from batches 1..N-1 are thrown away and an emptyMapis returned.Implementation Plan
try/catchfrom around the entireforloop to inside the loop body insrc/index.ts(fetchIssueRelationships, lines ~415-460)"doesn't exist on type"error:breakout of the loop (the sub-issues API is unavailable — no point continuing)core.warningper-batch, thencontinueto the next batchrelationshipsmap (partial results) instead ofnew Map()src/__tests__/unit/index.test.ts: add a multi-batch test where batch 1 succeeds and batch 2 fails, and assert that partial results from batch 1 are returnednpm run package