affaan-m/ECC · error · Error
Missing --repo <owner/repo>.
Error message
Missing --repo <owner/repo>.
What it means
main() in scripts/github-coordination.js validates after parseArgs that options.repo was supplied; if not, it throws 'Missing --repo <owner/repo>.' before loading policy or opening the store. Every coordination operation needs a target GitHub repository in owner/repo form.
Solutions
- Add --repo <owner/repo> to the invocation, e.g. --repo my-org/my-repo.
- Check the flag spelling against parseArgs — no other variant sets options.repo.
- In CI, ensure the repository env var is populated: `--repo "${GITHUB_REPOSITORY:?}"`.
- Wrap dispatch in a helper that injects a default repo for your team.
Example fix
// before node scripts/github-coordination.js claim --issue-number 42 // after node scripts/github-coordination.js claim --repo my-org/my-repo --issue-number 42
Defensive patterns
Strategy: validation
Validate before calling
if (!options.repo || !/^[^/]+\/[^/]+$/.test(options.repo)) {
throw new Error('Missing --repo <owner/repo>.');
} Type guard
const hasRepo = (o) => typeof o.repo === 'string' && /^[\w.-]+\/[\w.-]+$/.test(o.repo);
Try / catch
try {
await main();
} catch (e) {
if (e.message.includes('Missing --repo')) {
console.error('Pass --repo <owner/repo>, e.g. --repo my-org/my-repo');
process.exit(2);
}
throw e;
} Prevention
- Default to GITHUB_REPOSITORY in CI: --repo "${GITHUB_REPOSITORY:?}".
- Keep one wrapper script that injects the repo so call sites cannot forget it.
- Validate owner/repo shape (one slash, no spaces) before invoking.
- List required flags at the top of any runbook using this script.
When it happens
Trigger: Running the CLI without the --repo flag at all; --repo given with an empty value; a config/env-based wrapper that assumes a default repo which this script does not read.
Common situations: First-time users omitting the required flag; CI matrices where the repo variable is empty on forked PRs; aliasing the flag as --repository which parseArgs ignores; forgetting the flag when a subcommand-level flag list was documented instead.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- Missing issue number.
- open requires a file path
- is required exactly once for live node qualification.
- skills:amendify requires --skill
- skills:evaluate requires --skill
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/4cc9b22aab7d28bf.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/github-coordination.js:170
throw new Error(`Unknown command: ${options.command}`);
}
function formatOutput(payload, options) {
if (options.json) {
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
} else if (options.command === 'sync' || options.command === 'unblock') {
process.stdout.write(formatCollection(payload));
} else {
process.stdout.write(formatSummary(payload));
}
}
async function main() {
let store = null;
try {
const options = parseArgs(process.argv);
if (options.help) usage(0);
if (!options.repo) throw new Error('Missing --repo <owner/repo>.');
const policy = loadPolicy(process.cwd(), options.configPath);
store = await openStore({
dbPath: options.dbPath,
homeDir: options.homeDir || process.env.HOME || os.homedir(),
});
const payload = dispatchCommand(options, { store, policy, rootDir: process.cwd() });
formatOutput(payload, options);
} catch (error) {
console.error(`Error: ${error.message}`);
process.exit(1);
} finally {
if (store) store.close();
}
}
if (require.main === module) {View on GitHub (pinned to 8321021c54)