From c6a241e3319f8a4818581f22712aaccbccda0d26 Mon Sep 17 00:00:00 2001 From: Ravi Kumar <82090231+Raviguntakala@users.noreply.github.com> Date: Tue, 6 Jan 2026 00:29:42 +0530 Subject: ci: prevent duplicate PR check from flagging current PR as duplicate (#6924) Co-authored-by: Aiden Cline --- .opencode/tool/github-pr-search.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.opencode/tool') diff --git a/.opencode/tool/github-pr-search.ts b/.opencode/tool/github-pr-search.ts index 668557e38..587fdfaaf 100644 --- a/.opencode/tool/github-pr-search.ts +++ b/.opencode/tool/github-pr-search.ts @@ -45,6 +45,11 @@ export default tool({ } const prs = result.items as PR[] + + if (prs.length === 0) { + return `No other PRs found matching "${args.query}"` + } + const formatted = prs.map((pr) => `${pr.title}\n${pr.html_url}`).join("\n\n") return `Found ${result.total_count} PRs (showing ${prs.length}):\n\n${formatted}` -- cgit v1.2.3