ADD sha column ro pull request's files compare api

This commit is contained in:
Jasder
2020-11-06 22:03:12 +08:00
parent 6b505a34cb
commit 97973b95bf
5 changed files with 10 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
json.sha sha
json.name file['Name']
json.old_name file['OldName']
json.index file['Index']

View File

@@ -1,4 +1,4 @@
json.files_count @files_result['NumFiles']
json.total_addition @files_result['TotalAddition']
json.total_deletion @files_result['TotalDeletion']
json.files @files_result['Files'], partial: 'diff_file', as: :file
json.files @files_result['Files'], partial: 'diff_file', as: :file, locals: {sha: @files_result['LatestSha']}