stablyai/orca · error · Error
tag is required
Error message
tag is required
What it means
Thrown by createDraftRelease when the tag parameter is falsy. tag is required for tag_name, target_commitish, and release naming (create-draft-release.mjs:124-126). In main(), tag comes from process.argv[2], so this fires when the script is run without a positional tag argument.
Source
Thrown at config/scripts/create-draft-release.mjs:125
if (availableLength <= 0) {
throw new Error('Release truncation notice is longer than the maximum release body length')
}
return `${body.slice(0, availableLength).trimEnd()}${TRUNCATION_NOTICE}`
}
export async function createDraftRelease({
repo,
tag,
token,
fetchImpl = fetch,
log = console.log
}) {
if (!repo) {
throw new Error('repo is required')
}
if (!tag) {
throw new Error('tag is required')
}
if (!token) {
throw new Error('token is required')
}
const previousTag = latestPreviousPublishedDesktopReleaseTag(
await fetchRepoReleases(repo, token, fetchImpl),
tag
)
const generateNotesBody = {
tag_name: tag,
target_commitish: tag,
...(previousTag ? { previous_tag_name: previousTag } : {})
}
// Why: GitHub's generate-notes baseline ignores draft releases, so pass the
// previous public changelog boundary explicitly.
const releaseNotes = await githubJson(View on GitHub (pinned to 1136503c6a)
Solutions
- Pass a version tag as the first positional argument: node config/scripts/create-draft-release.mjs v1.4.160.
- In programmatic callers, always supply tag in the params object.
- Validate tag is non-empty and matches the desktop release pattern (vX.Y.Z or vX.Y.Z-rc.N) before calling.
Example fix
// before (CLI) node config/scripts/create-draft-release.mjs // after node config/scripts/create-draft-release.mjs v1.4.160
Defensive patterns
Strategy: validation
Validate before calling
const tag = process.argv[2]
if (!tag || !/^v\d+\.\d+\.\d+(?:-rc\.\d+)?$/.test(tag)) {
throw new Error('Provide a tag like v1.4.160 as the first argument')
} Prevention
- Pass the tag as the first positional CLI argument or a named param in programmatic calls.
- Validate the tag matches the desktop release pattern before invoking.
When it happens
Trigger: Running `node create-draft-release.mjs` with no argument; calling createDraftRelease without tag; passing an empty string as the tag positional.
Common situations: A release workflow step that forgot to pass $TAG; a CI trigger that did not set the tag variable; invoking the script during local testing without arguments.
Related errors
- --release requires a version argument, e.g. --release 1.4.16
- --baseline requires a path
- --candidate requires a path
- --title requires a value
- --output requires a path
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/72c6ace62d76e6f7.
Report an issue: GitHub.