mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 16:02:35 +00:00
fix(tasks): resolve PR work items upstream-first under 'auto' like issues (#8727)
This commit is contained in:
@@ -1109,8 +1109,10 @@ async function resolvePrWorkItemSource(
|
||||
getOriginGitHubApiRepository(repoPath, connectionId, localGitOptions),
|
||||
getGitHubApiRepositoryForRemote(repoPath, 'upstream', connectionId, localGitOptions)
|
||||
])
|
||||
const source =
|
||||
preference === 'upstream' ? (upstreamCandidate ?? originCandidate) : originCandidate
|
||||
// Why: fork-contribution PRs live on the upstream repo (the fork's own PR
|
||||
// list is almost always empty), so 'auto' resolves upstream-first exactly
|
||||
// like the issue side. Only an explicit 'origin' pick pins PRs to the fork.
|
||||
const source = preference === 'origin' ? originCandidate : (upstreamCandidate ?? originCandidate)
|
||||
return { source, originCandidate, upstreamCandidate }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user