@@ -111,6 +111,9 @@ async def fetch_file_content(
111111 """
112112 Fetch the content of a file from a local GitHub repository.
113113 """
114+ owner = owner .lower ()
115+ repo = repo .lower ()
116+
114117 source_path = Path (f"{ LOCAL_GH_DIR } /{ owner } /{ repo } .zip" )
115118 source_path = sanitize_file_path (source_path , [LOCAL_GH_DIR ])
116119 if not source_path or not source_path .exists ():
@@ -133,6 +136,9 @@ async def get_file_lines(
133136 length : int = Field (description = "The ending line number to fetch from the file" , default = 10 )) -> str :
134137 """Fetch a range of lines from a file in a local GitHub repository.
135138 """
139+ owner = owner .lower ()
140+ repo = repo .lower ()
141+
136142 source_path = Path (f"{ LOCAL_GH_DIR } /{ owner } /{ repo } .zip" )
137143 source_path = sanitize_file_path (source_path , [LOCAL_GH_DIR ])
138144 if not source_path or not source_path .exists ():
@@ -155,6 +161,9 @@ async def list_files(
155161 """
156162 Recursively list the files of a directory from a local GitHub repository.
157163 """
164+ owner = owner .lower ()
165+ repo = repo .lower ()
166+
158167 source_path = Path (f"{ LOCAL_GH_DIR } /{ owner } /{ repo } .zip" )
159168 source_path = sanitize_file_path (source_path , [LOCAL_GH_DIR ])
160169 if not source_path or not source_path .exists ():
@@ -173,6 +182,9 @@ async def list_files_non_recursive(
173182 List the files of a directory from a local GitHub repository non-recursively.
174183 Subdirectories will be listed and indicated with a trailing slash.
175184 """
185+ owner = owner .lower ()
186+ repo = repo .lower ()
187+
176188 source_path = Path (f"{ LOCAL_GH_DIR } /{ owner } /{ repo } .zip" )
177189 source_path = sanitize_file_path (source_path , [LOCAL_GH_DIR ])
178190 if not source_path or not source_path .exists ():
@@ -191,6 +203,9 @@ async def search_repo(
191203 """
192204 Search for the search term in the repository or a subdirectory/file in the repository.
193205 """
206+ owner = owner .lower ()
207+ repo = repo .lower ()
208+
194209 source_path = Path (f"{ LOCAL_GH_DIR } /{ owner } /{ repo } .zip" )
195210 source_path = sanitize_file_path (source_path , [LOCAL_GH_DIR ])
196211 if not source_path or not source_path .exists ():
0 commit comments