fix: keep originCandidate on raw origin remote for fork detection

resolvePrWorkItemSource resolved the raw origin candidate via getOwnerRepo,
which is now upstream-first. For fork repos that collapsed originCandidate
onto upstreamCandidate, hiding the issue-source selector in the renderer.
Resolve it via getOriginOwnerRepo so the raw origin remote is preserved, and
refresh two comments that still claimed PR lookups target origin.

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
brennanb2025
2026-07-05 22:25:20 -07:00
co-authored by Claude Orca
parent 62c9b87909
commit 7a9b4b219f
4 changed files with 22 additions and 10 deletions
@@ -36,6 +36,10 @@ vi.mock('./gh-utils', async () => {
execFileAsync: execFileAsyncMock,
ghExecFileAsync: ghExecFileAsyncMock,
getOwnerRepo: getOwnerRepoMock,
// Why: resolvePrWorkItemSource resolves the raw origin candidate via
// getOriginOwnerRepo; map it to the same mock these tests use for the
// origin PR repo.
getOriginOwnerRepo: getOwnerRepoMock,
getIssueOwnerRepo: getIssueOwnerRepoMock,
getOwnerRepoForRemote: getOwnerRepoForRemoteMock,
resolveIssueSource: resolveIssueSourceMock,