{"record":{"id":"c7e4a671e71cc468","repo":"coleam00/Archon","slug":"cannot-parse-github-url-sourceurl","errorCode":null,"errorMessage":"Cannot parse GitHub URL: ${sourceUrl}","messagePattern":"Cannot parse GitHub URL: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":5078,"sourceCode":"  return sourceUrl.includes('/tree/');\n}\n\n/**\n * Validate that a path component from an external source is safe to use in a filesystem path.\n * Rejects names containing path separators, traversal sequences, or non-portable characters.\n */\nfunction isSafePathComponent(name: string): boolean {\n  return name !== '.' && name !== '..' && /^[a-zA-Z0-9._-]+$/.test(name);\n}\n\n/** Parse owner/repo and path from a GitHub blob or tree URL. */\nfunction parseGitHubUrl(sourceUrl: string): { owner: string; repo: string; path: string } {\n  // https://github.com/owner/repo/blob/ref/path or https://github.com/owner/repo/tree/ref/path\n  const match = /^https:\\/\\/github\\.com\\/([^/]+)\\/([^/]+)\\/(blob|tree)\\/[^/]+\\/(.+)$/.exec(\n    sourceUrl\n  );\n  if (!match) {\n    throw new Error(`Cannot parse GitHub URL: ${sourceUrl}`);\n  }\n  return { owner: match[1], repo: match[2], path: match[4] };\n}\n\ninterface GitHubContentItem {\n  name: string;\n  type: 'file' | 'dir';\n  download_url: string | null;\n  path: string;\n}\n\n/** Fetch directory listing from GitHub Contents API at a pinned SHA. */\nasync function fetchGitHubDirectory(\n  owner: string,\n  repo: string,\n  path: string,\n  sha: string\n): Promise<GitHubContentItem[]> {","sourceCodeStart":5060,"sourceCodeEnd":5096,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L5060-L5096","documentation":"Error \"Cannot parse GitHub URL: ${sourceUrl}\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:5078 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}