From 1cad648e4f9e115c25c3cbe27c12415b5d17a5cc Mon Sep 17 00:00:00 2001 From: kenna-bmcdevitt Date: Wed, 28 Aug 2024 18:18:53 -0500 Subject: [PATCH] added more data to the contents output like name, sha, size, encoding, and html_url --- github_searcher.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/github_searcher.py b/github_searcher.py index a4ef386..ecb77e9 100644 --- a/github_searcher.py +++ b/github_searcher.py @@ -113,7 +113,15 @@ def main(): if args.get_file_contents: contents = searcher.get_repo_contents(item) if contents: - repo_info["contents"] = [content_file.name for content_file in contents] + repo_info["contents"] = [ + { + "name": content_file.name, + "sha": content_file.sha, + "size": content_file.size, + "encoding": content_file.encoding, + "html_url": content_file.html_url + } for content_file in contents + ] output.append(repo_info)