summaryrefslogtreecommitdiffhomepage
path: root/.opencode/tool/github-pr-search.ts
diff options
context:
space:
mode:
Diffstat (limited to '.opencode/tool/github-pr-search.ts')
-rw-r--r--.opencode/tool/github-pr-search.ts5
1 files changed, 5 insertions, 0 deletions
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}`