json.total_count @result_object[:total_data].to_i json.commits @result_object[:data].each do |commit| json.sha commit['sha'] json.author do json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(commit['commit']['author']), name: commit['commit']['author']['name'] } end json.committer do json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name'] } end json.commit_message commit['commit']['message'] json.time_from_now time_from_now(commit['created']) json.parent_shas commit['parents'].map{|x|x['sha']} end