From 1bf4cc5789b2a8fe12c107633c087b6ed533e085 Mon Sep 17 00:00:00 2001 From: 4 Bytes Robby Date: Sat, 5 Sep 2026 09:57:17 +0200 Subject: [PATCH] fix: use closedByPullRequestsReferences in gh_issue_close (#5) --- src/tools/gh-issue-close.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/gh-issue-close.ts b/src/tools/gh-issue-close.ts index 57a0b28..09e5283 100644 --- a/src/tools/gh-issue-close.ts +++ b/src/tools/gh-issue-close.ts @@ -13,7 +13,7 @@ interface IssueView { number: number; title: string; state: string; - closedByPullRequestsUrls: string[]; + closedByPullRequestsReferences: Array<{ number: number; url: string }>; } // ──────────────────────────────────────────────────────────────── @@ -63,7 +63,7 @@ export const ghIssueCloseTool = tool({ '--repo', resolvedRepo, '--json', - 'number,title,state,closedByPullRequestsUrls', + 'number,title,state,closedByPullRequestsReferences', ], cwd ); @@ -78,16 +78,16 @@ export const ghIssueCloseTool = tool({ } // ── Step 2: Zombie detection ── - const urls = issueView.closedByPullRequestsUrls || []; - const isZombie = urls.length > 0; + const refs = issueView.closedByPullRequestsReferences || []; + const isZombie = refs.length > 0; let outputLines: string[] = []; if (isZombie) { outputLines.push('⚠️ ZOMBIE ISSUE DETECTED'); outputLines.push(` Issue #${issueNum} "${issueView.title}" was closed by merged PR(s):`); - for (const url of urls) { - outputLines.push(` • ${url}`); + for (const ref of refs) { + outputLines.push(` • ${ref.url} (PR #${ref.number})`); } outputLines.push(' The associated PR is merged but the issue remained open.'); outputLines.push('');