diff --git a/github_searcher.py b/github_searcher.py index b4b6aea..f267379 100644 --- a/github_searcher.py +++ b/github_searcher.py @@ -55,8 +55,12 @@ class GithubSearcher(): def get_repo_contents(self, repo): try: contents = repo.get_contents("") - for content_file in contents: - print(content_file) + while contents: + file_content = contents.pop(0) + if file_content.type == "dir": + contents.extend(repo.get_contents(file_content.path)) + else: + print(file_content) return contents except GithubException as e: logging.error(f"Error getting repository contents: {e}")