mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
If tree is not in the contents, then just return empty files list
This commit is contained in:
@@ -127,6 +127,9 @@ class GithubToEntries(TextToEntries):
|
|||||||
# Extract markdown files from the repository
|
# Extract markdown files from the repository
|
||||||
markdown_files = []
|
markdown_files = []
|
||||||
org_files = []
|
org_files = []
|
||||||
|
if "tree" not in contents:
|
||||||
|
return markdown_files, org_files
|
||||||
|
|
||||||
for item in contents["tree"]:
|
for item in contents["tree"]:
|
||||||
# Find all markdown files in the repository
|
# Find all markdown files in the repository
|
||||||
if item["type"] == "blob" and item["path"].endswith(".md"):
|
if item["type"] == "blob" and item["path"].endswith(".md"):
|
||||||
|
|||||||
Reference in New Issue
Block a user