2020-11-06 17:23:14 +08:00
|
|
|
# json.key_format! camelize: :lower
|
|
|
|
|
json.files_count @commit_diff['NumFiles']
|
|
|
|
|
json.total_addition @commit_diff['TotalAddition']
|
|
|
|
|
json.total_deletion @commit_diff['TotalDeletion']
|
2020-11-09 17:23:19 +08:00
|
|
|
json.files @commit_diff['Files'], partial: 'pull_requests/diff_file', as: :file, locals: {sha: @sha}
|
2020-05-29 15:33:17 +08:00
|
|
|
|
2020-11-06 17:23:14 +08:00
|
|
|
json.partial! 'commit', commit: @commit, project: @project
|
2020-05-29 15:33:17 +08:00
|
|
|
json.parents @commit['parents'] do |parent|
|
|
|
|
|
json.sha parent['sha']
|
2020-11-06 17:23:14 +08:00
|
|
|
# json.url EduSetting.get('host_name') + commit_repository_path(@repo, parent['sha'])
|
2020-05-29 15:33:17 +08:00
|
|
|
end
|
2021-09-29 10:37:21 +08:00
|
|
|
json.branch @commit['branch']
|