新增: blobs和文件树接口及文档

This commit is contained in:
2022-07-15 17:03:18 +08:00
parent bd3cbf33fd
commit 0dd062ce1c
9 changed files with 483 additions and 33 deletions

View File

@@ -0,0 +1,4 @@
json.sha @result_object['sha']
json.size @result_object['size']
json.encoding @result_object['encoding']
json.content @result_object['content']

View File

@@ -0,0 +1,9 @@
json.total_count @result_object['total_count']
json.sha @result_object['sha']
json.entries @result_object['tree'].each do |entry|
json.name entry['path']
json.mode entry['mode']
json.type entry['type'] === 'blob' ? 'file' : 'dir'
json.size entry['size']
json.sha entry['sha']
end