fix(github): drop redundant is:pr from gh pr list search (#34633)

gh pr list already scopes --search with repo:OWNER/REPO type:pr. The
extra is:pr Orca added made private-repo PR lists come back empty when
gh is authenticated with a GitHub App user token (ghu_).

Fixes #34536
This commit is contained in:
BingZ
2026-10-27 23:09:11 -07:00
committed by GitHub
parent eac5699bcd
commit 92f3fef421
5 changed files with 14 additions and 14 deletions
@@ -29,10 +29,10 @@ export function buildWorkItemListRequest(args: {
const { kind, ownerRepo, limit, query, page } = args
const searchParts: string[] = []
// gh pr list adds repo: and type:pr itself; an extra is:pr empties private-repo results for ghu_ tokens.
if (kind === 'issue') {
searchParts.push(`repo:${ownerRepo.owner}/${ownerRepo.repo}`)
searchParts.push(`repo:${ownerRepo.owner}/${ownerRepo.repo}`, 'is:issue')
}
searchParts.push(kind === 'issue' ? 'is:issue' : 'is:pr')
if (query.state === 'open') {
searchParts.push('is:open')