{"record":{"id":"4cc9b22aab7d28bf","repo":"affaan-m/ECC","slug":"missing-repo-owner-repo","errorCode":null,"errorMessage":"Missing --repo <owner/repo>.","messagePattern":"Missing --repo <owner/repo>\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/github-coordination.js","lineNumber":170,"sourceCode":"  throw new Error(`Unknown command: ${options.command}`);\n}\n\nfunction formatOutput(payload, options) {\n  if (options.json) {\n    process.stdout.write(`${JSON.stringify(payload, null, 2)}\\n`);\n  } else if (options.command === 'sync' || options.command === 'unblock') {\n    process.stdout.write(formatCollection(payload));\n  } else {\n    process.stdout.write(formatSummary(payload));\n  }\n}\n\nasync function main() {\n  let store = null;\n  try {\n    const options = parseArgs(process.argv);\n    if (options.help) usage(0);\n    if (!options.repo) throw new Error('Missing --repo <owner/repo>.');\n\n    const policy = loadPolicy(process.cwd(), options.configPath);\n    store = await openStore({\n      dbPath: options.dbPath,\n      homeDir: options.homeDir || process.env.HOME || os.homedir(),\n    });\n\n    const payload = dispatchCommand(options, { store, policy, rootDir: process.cwd() });\n    formatOutput(payload, options);\n  } catch (error) {\n    console.error(`Error: ${error.message}`);\n    process.exit(1);\n  } finally {\n    if (store) store.close();\n  }\n}\n\nif (require.main === module) {","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/github-coordination.js#L152-L188","documentation":"Thrown by main() in scripts/github-coordination.js when the --repo flag is not provided (options.repo is falsy). The --repo <owner/repo> flag is mandatory for all commands because every operation targets a specific GitHub repository.","triggerScenarios":"Running any github-coordination command without the --repo flag, e.g. `node scripts/github-coordination.js sync` or `node scripts/github-coordination.js claim --issue 5`.","commonSituations":"Forgetting --repo entirely, or misspelling it (e.g. `--repository`), or a shell variable expansion that produces an empty value.","solutions":["Add --repo <owner/repo> to your command.","Verify the repo value is in 'owner/repo' format (e.g. 'affaan-m/ECC').","Check that any shell variable used for the repo value is set and non-empty.","Run --help to confirm the flag name and format."],"exampleFix":"// before\nnode scripts/github-coordination.js sync\n// after\nnode scripts/github-coordination.js sync --repo owner/repo","handlingStrategy":"validation","validationCode":"if (!options.repo || !/^[\\w.-]+\\/[\\w.-]+$/.test(options.repo)) {\n  console.error('Missing or invalid --repo. Expected format: owner/repo');\n  process.exit(1);\n}","typeGuard":"function isValidRepoRef(repo) {\n  return typeof repo === 'string' && /^[\\w.-]+\\/[\\w.-]+$/.test(repo);\n}","tryCatchPattern":null,"preventionTips":["Always pass --repo owner/repo as the first flag.","Validate the repo format in CI before invoking.","Set the repo in a shell variable and check it is non-empty before use."],"tags":["cli","github","validation","missing-argument"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}