Merge branch 'develop' into trustie_server
This commit is contained in:
commit
8ce7fd95cb
|
@ -1,10 +1,10 @@
|
|||
json.author do
|
||||
author = User.find_by(login: commit['Author']['Name'])
|
||||
author = User.find_by(mail: commit['Author']['Email'])
|
||||
json.partial! 'repositories/commit_author', locals: { user: author, name: commit['Committer']['Name'] }
|
||||
end
|
||||
|
||||
json.committer do
|
||||
author = User.find_by(login: commit['Committer']['Name'])
|
||||
author = User.find_by(mail: commit['Committer']['Email'])
|
||||
json.partial! 'repositories/commit_author', locals: { user: author, name: commit['Committer']['Name'] }
|
||||
end
|
||||
json.timestamp render_unix_time(commit['Committer']['When'])
|
||||
|
|
|
@ -5,12 +5,15 @@ else
|
|||
json.total_count @hash_commit[:total_count]
|
||||
json.commits do
|
||||
json.array! @hash_commit[:body] do |commit|
|
||||
json.commit1 commit
|
||||
commiter = commit['committer']
|
||||
if commiter.present?
|
||||
commit_user_id = commiter['id']
|
||||
forge_user = User.simple_select.find_by(gitea_uid: commit_user_id)
|
||||
end
|
||||
|
||||
forge_user =
|
||||
if commiter.present?
|
||||
User.simple_select.find_by(mail: commiter['email'])
|
||||
else
|
||||
User.simple_select.find_by(mail: commit['commit']['committer']['email'])
|
||||
end
|
||||
|
||||
json.sha commit['sha']
|
||||
json.message commit['commit']['message']
|
||||
json.timestamp render_unix_time(commit['commit']['author']['date'])
|
||||
|
|
Loading…
Reference in New Issue