forgeplus/app/views/api/v1/projects/blame.json.jbuilder

23 lines
1.0 KiB
Ruby

json.file_size @result_object['file_size']
json.file_name @result_object['file_name']
json.num_lines @result_object['num_lines']
json.blame_parts @result_object['blame_parts'] do |part|
json.commit do
json.sha part['commit']['id']
json.author do
json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(part['commit']['author']), name: part['commit']['author']['Name'] }
end
json.committer do
json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(part['commit']['commiter']), name: part['commit']['commiter']['Name'] }
end
json.commit_message part['commit']['commit_message']
json.authored_time render_unix_time(part['commit']['authored_time'])
json.committed_time render_unix_time(part['commit']['committed_time'])
json.created_time render_unix_time(part['commit']['created_time'])
end
json.previous_number part['previous_number']
json.current_number part['current_number']
json.effect_line part['effect_line']
json.lines part['lines']
end