{"record":{"id":"8843e82b44c59dbe","repo":"Hmbown/CodeWhale","slug":"invalid-github-repository-repo","errorCode":null,"errorMessage":"Invalid GitHub repository: ${repo}","messagePattern":"Invalid GitHub repository: (.+?)","errorType":"console","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/release/ensure-release-assets-absent.js","lineNumber":11,"sourceCode":"#!/usr/bin/env node\n\nconst { execFileSync } = require(\"node:child_process\");\n\nfunction usage() {\n  return \"Usage: node scripts/release/ensure-release-assets-absent.js OWNER/REPO vX.Y.Z\";\n}\n\nfunction validateTarget(repo, tag) {\n  if (!/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/.test(repo)) {\n    throw new Error(`Invalid GitHub repository: ${repo}`);\n  }\n  if (!/^v[0-9]+\\.[0-9]+\\.[0-9]+$/.test(tag)) {\n    throw new Error(`Invalid release tag: ${tag}`);\n  }\n}\n\nfunction isNotFoundError(error) {\n  return (\n    error &&\n    error.status !== 0 &&\n    /\\bHTTP 404\\b/.test(String(error.stderr || \"\"))\n  );\n}\n\nfunction fetchRelease(repo, tag, ghBin = process.env.GH_BIN || \"gh\", exec = execFileSync) {\n  validateTarget(repo, tag);\n  const endpoint = `repos/${repo}/releases/tags/${encodeURIComponent(tag)}`;\n  let output;","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/scripts/release/ensure-release-assets-absent.js#L1-L29","documentation":"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).","triggerScenarios":"Thrown at scripts/release/ensure-release-assets-absent.js:11 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}