Hmbown/CodeWhale · error · Error
Invalid GitHub repository
Error message
Invalid GitHub repository: ${repo} What it means
Validation guard in validateTarget(): the OWNER/REPO argument failed the ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ pattern, so it is not a well-formed GitHub repository slug. This is a fail-fast check before any gh API call; at fault is the repo argument passed to the script (typos, slashes in the wrong place, or URL pasted instead of slug).
Solutions
- Pass the repository as OWNER/REPO, e.g. anomalyco/codewhale — not a full URL and not just the repo name
- Check for stray whitespace, quotes, or extra path segments in the argument
- Verify the values come from correctly parsed workflow inputs or CLI arguments
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/release/ensure-release-assets-absent.js:11 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/8843e82b44c59dbe.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/release/ensure-release-assets-absent.js:11
#!/usr/bin/env node
const { execFileSync } = require("node:child_process");
function usage() {
return "Usage: node scripts/release/ensure-release-assets-absent.js OWNER/REPO vX.Y.Z";
}
function validateTarget(repo, tag) {
if (!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repo)) {
throw new Error(`Invalid GitHub repository: ${repo}`);
}
if (!/^v[0-9]+\.[0-9]+\.[0-9]+$/.test(tag)) {
throw new Error(`Invalid release tag: ${tag}`);
}
}
function isNotFoundError(error) {
return (
error &&
error.status !== 0 &&
/\bHTTP 404\b/.test(String(error.stderr || ""))
);
}
function fetchRelease(repo, tag, ghBin = process.env.GH_BIN || "gh", exec = execFileSync) {
validateTarget(repo, tag);
const endpoint = `repos/${repo}/releases/tags/${encodeURIComponent(tag)}`;
let output;View on GitHub (pinned to 433685b202)