mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 16:02:50 +00:00
* fix(github): fail closed when the SSH git provider is gone getCurrentHeadOid and probeTrackedUpstreamBranches only routed through the SSH provider when one was registered. With connectionId set but the provider unregistered (dropped connection, not yet reattached) they fell through to client-side git with cwd pointing at the remote repoPath — on a machine with a same-named local path that silently answers for the wrong repository. getCurrentHeadOid feeds shouldHideMergedImplicitPR, so a wrong OID changes which PR the UI attributes to a worktree. Both now take their existing unknown path (null / probeFailed) instead, matching repo-default-branch.ts. Local and WSL routing is unchanged. * fix(github): preserve PR state when SSH probes fail * fix(github): keep failed SSH discovery unverifiable * fix(github): propagate SSH identity failures * fix(github): scope verified SSH identity probes * test(github): preserve tolerant resolver calls * fix(github): preserve indeterminate auth discovery * fix(github): isolate SSH repository probe generations * test(github): expose SSH probe generation in mocks
19 lines
738 B
TypeScript
19 lines
738 B
TypeScript
import type { GitHubOwnerRepo } from '../../shared/github/pull-request-types'
|
|
|
|
export function githubHostExecOptions(repository: GitHubOwnerRepo | null | undefined): {
|
|
host?: string
|
|
} {
|
|
return repository?.host ? { host: repository.host } : {}
|
|
}
|
|
|
|
export function githubRepositoryWebHost(repository: GitHubOwnerRepo): string {
|
|
return repository.host ?? 'github.com'
|
|
}
|
|
|
|
/** Host-qualified positional slug for commands that bypass the runner's `--repo`. */
|
|
export function githubRepositorySlugArg(repository: GitHubOwnerRepo): string {
|
|
const slug = `${repository.owner}/${repository.repo}`
|
|
// Why: pin dotcom too so process-level GH_HOST cannot redirect the request.
|
|
return repository.host ? `${repository.host}/${slug}` : slug
|
|
}
|