{"record":{"id":"a01921ccc1789f3a","repo":"infiniflow/ragflow","slug":"no-files-found-in-the-repository","errorCode":null,"errorMessage":"No files found in the repository","messagePattern":"No files found in the repository","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"web/src/pages/skills/components/upload-modal.tsx","lineNumber":589,"sourceCode":"          `Invalid ${PLATFORM_CONFIG[gitPlatform].name} URL format`,\n        );\n      }\n\n      const { owner, repo, ref, path } = parsed;\n\n      // 1. Fetch file list from Git API\n      setGitProgress('Fetching file list...');\n      const gitFiles = await fetchGitDirectoryContents(\n        gitPlatform,\n        owner,\n        repo,\n        path,\n        ref,\n        gitToken || undefined,\n      );\n\n      if (gitFiles.length === 0) {\n        throw new Error('No files found in the repository');\n      }\n\n      // Filter out common non-skill files\n      const filteredGitFiles = gitFiles.filter((f) => {\n        const name = f.path.split('/').pop()?.toLowerCase();\n        // Skip common non-code files\n        if (\n          [\n            '.gitignore',\n            'license',\n            'copying',\n            'makefile',\n            'dockerfile',\n          ].includes(name || '')\n        ) {\n          return false;\n        }\n        return true;","sourceCodeStart":571,"sourceCodeEnd":607,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/web/src/pages/skills/components/upload-modal.tsx#L571-L607","documentation":"Raised after fetching the git repository's file list succeeds but returns zero entries for the given path/ref. The contents API responded ok, but the directory (or repo root with a path filter) contains no files visible to the request.","triggerScenarios":"The path points to an empty directory; the directory contains only subdirectories and the fetch only captured the top level; the path is a single file that was filtered out client-side; the ref is correct but the folder exists only on another branch.","commonSituations":"Pointing the importer at a docs/ or assets-only folder with no skill files; path casing mismatch (Path vs path) resolving to an empty listing on case-sensitive hosts; wrong branch selected.","solutions":["Point the import URL at the folder that actually contains the skill files (e.g. the repo root or the skill directory)","Verify the folder is non-empty on the exact branch/ref in the URL","Check path casing matches the repository exactly","If importing a single file, ensure it is a file the API lists (not an LFS pointer or symlink)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// after fetching the listing, verify there is at least one file entry\nconst fileEntries = gitFiles.filter((f) => f.type === 'file');\nif (fileEntries.length === 0) {\n  setGitValidationStatus('invalid');\n  setGitValidationMessage('No downloadable files at this path — check the folder and branch.');\n  return;\n}","typeGuard":"function hasFileEntries(files: { type?: string }[]): boolean {\n  return files.some((f) => f.type === 'file');\n}","tryCatchPattern":"try {\n  const gitFiles = await fetchGitDirectoryContents(/* ... */);\n  if (gitFiles.length === 0) throw new Error('No files found in the repository');\n} catch (e) {\n  setGitValidationStatus('invalid');\n  setGitValidationMessage(e instanceof Error ? e.message : String(e));\n}","preventionTips":["Point the import path at the folder containing the skill files, not an assets/docs folder","Match path casing exactly — git hosts are case-sensitive","Confirm the folder exists on the branch named in the URL"],"tags":["github-api","empty-result","url","skills"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}