added more data to the contents output like name, sha, size, encoding, and html_url
This commit is contained in:
parent
aac7c02167
commit
1cad648e4f
1 changed files with 9 additions and 1 deletions
|
@ -113,7 +113,15 @@ def main():
|
||||||
if args.get_file_contents:
|
if args.get_file_contents:
|
||||||
contents = searcher.get_repo_contents(item)
|
contents = searcher.get_repo_contents(item)
|
||||||
if contents:
|
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)
|
output.append(repo_info)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue