mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 17:17:38 +00:00
* Reduce repeated imports in SourceControl and socket tests * Retire test-only scans and skip unrelated server test matrices
17 lines
428 B
TypeScript
17 lines
428 B
TypeScript
import type { HookCommandSourcePolicy } from './orca-yaml-hook-types'
|
|
|
|
export function resolveHookCommandSourcePolicy(
|
|
policy: unknown,
|
|
{ hasLocalScript }: { hasLocalScript: boolean }
|
|
): HookCommandSourcePolicy {
|
|
if (policy === 'local-only' || policy === 'run-both' || policy === 'shared-only') {
|
|
return policy
|
|
}
|
|
|
|
if (policy === undefined && hasLocalScript) {
|
|
return 'local-only'
|
|
}
|
|
|
|
return 'shared-only'
|
|
}
|