stablyai/orca · error · Error
repo is required
Error message
repo is required
What it means
Thrown by publishCompleteDraftReleases in config/scripts/publish-complete-draft-releases.mjs when the `repo` option is falsy. The function needs the `{owner}/{name}` slug to build every GitHub API URL (list releases, verify assets, PATCH a draft), so an empty repo makes all downstream calls meaningless. The guard at line 84-85 runs before any network call.
Source
Thrown at config/scripts/publish-complete-draft-releases.mjs:85
`https://api.github.com/repos/${repo}/releases?per_page=100`,
token
)
if (!Array.isArray(releases)) {
throw new Error(`GitHub releases response for ${repo} was not an array`)
}
return releases
}
export async function publishCompleteDraftReleases({
repo,
token,
fetchImpl = fetch,
verifyReleaseAssets = verifyRequiredReleaseAssets,
isDraftBuiltFromCurrentRef = ({ tag }) => isTagBuiltFromCurrentRef(tag),
log = console.log
}) {
if (!repo) {
throw new Error('repo is required')
}
if (!token) {
throw new Error('token is required')
}
const releases = await fetchReleases(repo, token, fetchImpl)
const candidates = releases
.filter(isReleaseCutDraft)
.sort((a, b) => new Date(a.created_at ?? 0).getTime() - new Date(b.created_at ?? 0).getTime())
const published = []
const skipped = []
for (const release of candidates) {
const tag = release.tag_name
if (!(await Promise.resolve(isDraftBuiltFromCurrentRef({ tag, release })))) {
const reason = 'tag is not built from the current release ref'
skipped.push({ tag, reason })View on GitHub (pinned to 1136503c6a)
Solutions
- Pass a `{owner}/{name}` repo slug, e.g. `publishCompleteDraftReleases({ repo: 'stablyai/orca', token })`.
- In the CLI path, ensure GITHUB_REPOSITORY is set or unset (it defaults to 'stablyai/orca').
- Forward the repo from your caller rather than relying on an implicit default.
Example fix
// before
await publishCompleteDraftReleases({ token })
// after
await publishCompleteDraftReleases({ repo: 'stablyai/orca', token }) Defensive patterns
Strategy: validation
Validate before calling
if (!repo || !/^.+\/.+$/.test(repo)) {
throw new Error(`publishCompleteDraftReleases needs an {owner}/{name} repo slug, got: ${String(repo)}`)
} Type guard
function isRepoSlug(value) {
return typeof value === 'string' && /^[-.\w]+\/.+$/.test(value)
} Prevention
- Always forward GITHUB_REPOSITORY when invoking the script in CI.
- Pass an explicit `repo` option when calling the API directly.
- Validate the slug shape at the call site before the network call.
When it happens
Trigger: Call `publishCompleteDraftReleases({ token })` (no repo), or call it with `repo: ''` / `repo: undefined`. When run via main(), repo defaults to `process.env.GITHUB_REPOSITORY || 'stablyai/orca'`, so the direct-API path (tests, other scripts) is where this typically fires.
Common situations: A test or downstream script calls the exported function without forwarding GITHUB_REPOSITORY, or a refactor changes the option name. In the CLI path it only triggers if GITHUB_REPOSITORY is explicitly set to an empty string (overriding the 'stablyai/orca' default).
Related errors
- token is required
- GitHub request failed ${res.status} ${res.statusText}: ${bod
- GitHub releases response for ${repo} was not an array
- malformed stack
- missing head SHA
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/96ec77770705ac1b.
Report an issue: GitHub.