{"record":{"id":"9aeb0d15c392e0d4","repo":"paperclipai/paperclip","slug":"github-source-must-be-a-github-or-github-enterpris","errorCode":null,"errorMessage":"GitHub source must be a GitHub or GitHub Enterprise URL, or owner/repo[/path] shorthand.","messagePattern":"GitHub source must be a GitHub or GitHub Enterprise URL, or owner/repo\\[/path\\] shorthand\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/company.ts","lineNumber":904,"sourceCode":"  return url.toString();\n}\n\nexport function normalizeGithubImportSource(input: string, refOverride?: string): string {\n  const trimmed = input.trim();\n  const ref = refOverride?.trim();\n\n  if (isGithubShorthand(trimmed)) {\n    const [owner, repo, ...repoPath] = trimmed.split(\"/\").filter(Boolean);\n    return buildGithubImportUrl({\n      owner: owner!,\n      repo: repo!,\n      ref: ref || \"main\",\n      path: repoPath.join(\"/\"),\n    });\n  }\n\n  if (!looksLikeRepoUrl(trimmed)) {\n    throw new Error(\"GitHub source must be a GitHub or GitHub Enterprise URL, or owner/repo[/path] shorthand.\");\n  }\n  if (!ref) {\n    return trimmed;\n  }\n\n  const url = new URL(trimmed);\n  const hostname = url.hostname;\n  const parts = url.pathname.split(\"/\").filter(Boolean);\n  if (parts.length < 2) {\n    throw new Error(\"Invalid GitHub URL.\");\n  }\n\n  const owner = parts[0]!;\n  const repo = parts[1]!;\n  const existingPath = normalizeGithubImportPath(url.searchParams.get(\"path\"));\n  const existingCompanyPath = normalizeGithubImportPath(url.searchParams.get(\"companyPath\"));\n  if (existingCompanyPath) {\n    return buildGithubImportUrl({ hostname, owner, repo, ref, companyPath: existingCompanyPath });","sourceCodeStart":886,"sourceCodeEnd":922,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/company.ts#L886-L922","documentation":"normalizeGithubImportSource rejects the --from source string because it is neither an owner/repo[/path] shorthand nor a URL that looks like a GitHub or GitHub Enterprise host.","triggerScenarios":"Thrown at cli/src/commands/client/company.ts:904 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a full GitHub/GitHub Enterprise URL (https://github.com/owner/repo) or the owner/repo[/path] shorthand."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}