fix: pr-bug-scan validated finding from #1917 (#1961)

Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
This commit is contained in:
buf0-bot[bot]
2026-05-15 17:01:11 -07:00
committed by GitHub
co-authored by orca-bug-scan-bot
parent 08c2463b6f
commit 014cc1e4b3
+6
View File
@@ -100,6 +100,12 @@ export async function searchIssues(
}
})
)
// Why: searchIssues returns Linear's relevance ranking. Re-sorting by
// updatedAt would discard relevance order for single-workspace results,
// diverging from Linear's web UI and pre-PR behavior.
if (entries.length === 1) {
return results.flat().slice(0, limit)
}
return sortAndLimitIssues(results.flat(), limit)
}