Skip to content

resolvePrRepoContext

resolvePrRepoContext(prId): Promise<string | PrRepoContext>

Defined in: review/src/tools/ghReadFileTool.ts:83

Resolves the owner/repo and head ref of the PR under review from the GitHub CLI, so the file read is bound to the PR’s own repository rather than anything the model supplies. With a prId the PR is addressed explicitly; without one gh pr view resolves the current branch’s PR (the gth pr discovery mode). Returns the context, or an explanatory string on any failure.

string | undefined

Promise<string | PrRepoContext>