|
|
|
@@ -1,19 +1,21 @@ |
|
|
|
json.commits_count @compare_result['CommitsCount'] |
|
|
|
# json.commits @compare_result['Commits'], partial: 'pull_requests/commit', as: :commit |
|
|
|
json.commits do |
|
|
|
json.array! @compare_result['Commits'][@page_offset...(@page_offset + @page_limit)] do |commit| |
|
|
|
json.author do |
|
|
|
json.partial! 'repositories/commit_author', locals: { user: render_cache_commit_author(commit['Committer']), name: commit['Committer']['Name'] } |
|
|
|
end |
|
|
|
if @compare_result['Commits'].present? |
|
|
|
json.array! @compare_result['Commits'][@page_offset...(@page_offset + @page_limit)] do |commit| |
|
|
|
json.author do |
|
|
|
json.partial! 'repositories/commit_author', locals: { user: render_cache_commit_author(commit['Committer']), name: commit['Committer']['Name'] } |
|
|
|
end |
|
|
|
|
|
|
|
json.committer do |
|
|
|
json.partial! 'repositories/commit_author', locals: { user: render_cache_commit_author(commit['Committer']), name: commit['Committer']['Name'] } |
|
|
|
json.committer do |
|
|
|
json.partial! 'repositories/commit_author', locals: { user: render_cache_commit_author(commit['Committer']), name: commit['Committer']['Name'] } |
|
|
|
end |
|
|
|
json.timestamp render_unix_time(commit['Committer']['When']) |
|
|
|
json.time_from_now time_from_now(commit['Committer']['When']) |
|
|
|
json.created_at render_format_time_with_date(commit['Committer']['When']) |
|
|
|
json.message commit['CommitMessage'] |
|
|
|
json.sha commit['Sha'] |
|
|
|
end |
|
|
|
json.timestamp render_unix_time(commit['Committer']['When']) |
|
|
|
json.time_from_now time_from_now(commit['Committer']['When']) |
|
|
|
json.created_at render_format_time_with_date(commit['Committer']['When']) |
|
|
|
json.message commit['CommitMessage'] |
|
|
|
json.sha commit['Sha'] |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|