add: branch commiter user info

This commit is contained in:
2021-09-14 10:59:01 +08:00
parent af7488505d
commit 333d6a8ea4
3 changed files with 19 additions and 7 deletions

View File

@@ -11,7 +11,11 @@ json.array! @branches do |branch|
json.message branch['commit']['message']
json.timestamp render_unix_time(branch['commit']['timestamp'])
json.time_from_now time_from_now(branch['commit']['timestamp'])
json.author branch['commit']['author']
json.committer branch['commit']['committer']
json.author do
json.partial! 'repositories/commit_author', user: render_commit_author(branch['commit']['author']), name: branch['commit']['author']['name']
end
json.committer do
json.partial! 'repositories/commit_author', user: render_commit_author(branch['commit']['committer']), name: branch['commit']['committer']['name']
end
end
end