You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
479 B
22 lines
479 B
6 years ago
|
json.commits commits do |commit|
|
||
|
json.title commit["title"]
|
||
|
json.time time_from_now(commit["created_at"])
|
||
|
json.id commit["id"]
|
||
|
|
||
|
user = git_username(commit["author_email"])
|
||
|
if user.present?
|
||
|
json.author do
|
||
|
if user
|
||
|
json.partial! 'users/user', user: user
|
||
|
end
|
||
|
end
|
||
|
else
|
||
|
json.author do
|
||
|
json.id nil
|
||
|
json.login nil
|
||
|
json.name commit["author_name"]
|
||
|
json.email commit["author_email"]
|
||
|
end
|
||
|
end
|
||
|
end
|