added more data to the contents output like name, sha, size, encoding, and html_url

This commit is contained in:
kenna-bmcdevitt 2024-08-28 18:18:53 -05:00
parent aac7c02167
commit 1cad648e4f

View file

@ -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)