mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user