{"record":{"id":"91fb7c8ef470fe46","repo":"affaan-m/ECC","slug":"missing-issue-number","errorCode":null,"errorMessage":"Missing issue number.","messagePattern":"Missing issue number\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/github-coordination.js","lineNumber":123,"sourceCode":"    } else {\n      throw new Error(`Unknown argument: ${arg}`);\n    }\n  }\n\n  if (!parsed.command) parsed.command = 'sync';\n  if (!parsed.issueNumber && parsed.positionals.length > 0) {\n    parsed.issueNumber = normalizeIssueNumber(parsed.positionals[0]);\n  }\n\n  return parsed;\n}\n\nfunction dispatchCommand(options, ctx) {\n  const { store, policy, rootDir } = ctx;\n  const base = { configPath: options.configPath, dryRun: options.dryRun };\n\n  if (options.command === 'claim') {\n    if (!options.issueNumber) throw new Error('Missing issue number.');\n    return applyClaim(options.repo, options.issueNumber, {\n      ...base, actor: options.actor, branch: options.branch, owner: options.actor,\n      projectState: options.projectState, review: options.review,\n      status: options.status, validation: options.validation,\n    }, { store, policy, rootDir });\n  }\n  if (options.command === 'sync') {\n    return applySync(options.repo, { ...base, limit: options.limit }, { store, policy, rootDir });\n  }\n  if (options.command === 'validate') {\n    if (!options.issueNumber) throw new Error('Missing issue number.');\n    return applyValidate(options.repo, options.issueNumber, base, { store, policy, rootDir });\n  }\n  if (options.command === 'publish') {\n    if (!options.issueNumber) throw new Error('Missing issue number.');\n    return applyPublish(options.repo, options.issueNumber, base, { store, policy, rootDir });\n  }\n  if (options.command === 'review') {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/github-coordination.js#L105-L141","documentation":"Thrown by dispatchCommand() in scripts/github-coordination.js when the 'claim' subcommand is invoked without an issue number. The code checks `if (!options.issueNumber)` before delegating to applyClaim. The issue number identifies which GitHub issue to claim.","triggerScenarios":"Running `node scripts/github-coordination.js claim --repo owner/repo` without providing --issue <n> or a positional issue number. The parser leaves options.issueNumber undefined.","commonSituations":"Forgetting the --issue flag, providing a malformed issue number that normalizeIssueNumber rejects (returns falsy), or expecting a default issue from context that does not exist.","solutions":["Add --issue <number> or pass the issue number as a positional: `claim owner/repo 42`.","Verify normalizeIssueNumber accepts your format (should be numeric or #N form).","Run with --help to see the required arguments for the claim command."],"exampleFix":"// before\nnode scripts/github-coordination.js claim --repo owner/repo\n// after\nnode scripts/github-coordination.js claim --repo owner/repo --issue 42","handlingStrategy":"validation","validationCode":"if (options.command === 'claim' && !options.issueNumber) {\n  console.error('The claim command requires --issue <number>.');\n  process.exit(1);\n}","typeGuard":"function hasIssueNumber(options) {\n  return options.issueNumber != null && options.issueNumber !== '' && !Number.isNaN(options.issueNumber);\n}","tryCatchPattern":null,"preventionTips":["Always include --issue for commands that require it.","Build issue numbers from validated upstream data in automation.","Add a pre-flight check in CI scripts that verifies required flags."],"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"}