stablyai/orca · error · Error
GITHUB_REPOSITORY must be in owner/repo form, got "${options
Error message
GITHUB_REPOSITORY must be in owner/repo form, got "${options.repo}". What it means
Thrown by createGitHubApiClient when options.repo (from GITHUB_REPOSITORY) does not split into a non-empty owner and repo via '/'. The client derives api.owner and api.repo from this single value, so a malformed value (missing slash, empty segment, extra slashes) is fatal.
Source
Thrown at config/scripts/run-release-mac-build-workflow.mjs:149
`Mac release build workflow is ${run.status}; polling again in ${options.pollSeconds}s`
)
await sleep(options.pollSeconds * 1000)
}
throw new Error(
`Timed out after ${options.timeoutMinutes}m waiting for mac release build workflow ${workflowRunId}.`
)
}
export function createGitHubApiClient(options, deps = {}) {
const fetchImpl = deps.fetch ?? globalThis.fetch
if (typeof fetchImpl !== 'function') {
throw new Error('A fetch implementation is required.')
}
const [owner, repo] = options.repo.split('/')
if (!owner || !repo) {
throw new Error(`GITHUB_REPOSITORY must be in owner/repo form, got "${options.repo}".`)
}
return {
owner,
repo,
async request(method, path, body) {
const response = await fetchImpl(`${options.apiBaseUrl}${path}`, {
body: body == null ? undefined : JSON.stringify(body),
headers: {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${options.token}`,
'Content-Type': 'application/json',
'X-GitHub-Api-Version': DEFAULT_API_VERSION
},
method
})
const text = await response.text()
const data = text.length > 0 ? JSON.parse(text) : nullView on GitHub (pinned to 1136503c6a)
Solutions
- Set GITHUB_REPOSITORY to exactly owner/repo (e.g. anomaly/orca).
- Trim whitespace and remove surrounding quotes from the env value.
- If forking, point GITHUB_REPOSITORY at the fork's owner/repo that has the workflow.
Example fix
# before GITHUB_REPOSITORY=orca # after GITHUB_REPOSITORY=anomaly/orca
Defensive patterns
Strategy: validation
Validate before calling
const [owner, repo] = (env.GITHUB_REPOSITORY ?? '').split('/')
if (!owner || !repo || owner.includes('/') || repo.includes('/')) {
throw new Error('Set GITHUB_REPOSITORY to owner/repo, e.g. anomaly/orca')
} Type guard
function isOwnerRepo(value) {
if (typeof value !== 'string') return false
const parts = value.split('/')
return parts.length === 2 && parts.every((p) => p.length > 0)
} Try / catch
try {
api = createGitHubApiClient(options)
} catch (err) {
if (/GITHUB_REPOSITORY must be in owner/repo form/.test(err.message)) {
// fix the env var and reconstruct
}
throw err
} Prevention
- Validate GITHUB_REPOSITORY format in a preflight before constructing the client.
- Trim whitespace and strip quotes when reading the env var.
- Document the expected owner/repo form at the script entrypoint.
When it happens
Trigger: GITHUB_REPOSITORY is unset (caught earlier by requiredEnv), set to just 'orca', 'orca/', '/orca', 'a/b/c', or contains only whitespace such that owner or repo is empty after split.
Common situations: Running outside GitHub Actions where GITHUB_REPOSITORY is not auto-set, manual override with a typo, value copied with surrounding quotes/whitespace, fork rename not reflected.
Related errors
- Expected a positive integer, got "${rawValue}".
- ${name} must be a positive integer, received ${value}
- ${name} must be a positive integer, received ${value}
- ORCA_ELECTRON_PACKAGE_RETRY_DELAYS_MS must contain non-negat
- No worktrees on environment ${envName}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/cce7826f009e0b15.
Report an issue: GitHub.