fixed @compare_result null done

This commit is contained in:
xxq250 2023-08-07 15:20:07 +08:00
parent 5fb8c7739f
commit eb860f742a
1 changed files with 13 additions and 11 deletions

View File

@ -1,6 +1,7 @@
json.commits_count @compare_result['CommitsCount']
# json.commits @compare_result['Commits'], partial: 'pull_requests/commit', as: :commit
json.commits do
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'] }
@ -15,6 +16,7 @@ json.commits do
json.message commit['CommitMessage']
json.sha commit['Sha']
end
end
end
json.diff do