diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-12 12:53:03 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-12 12:53:03 +0300 |
commit | 0541bffa85cde86d4ce142b6fe2d3e1357b1acc5 (patch) | |
tree | 16984b3b980a3879feef66d08c47beba9cfd81c0 /app/serializers | |
parent | 6186ac2c3d0db6932993ac681cbed6f453499503 (diff) |
Expose commit author's gravatar if not gitlab user
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/commit_entity.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/commit_entity.rb b/app/serializers/commit_entity.rb index f7eba6fc1e3..121ca76a16f 100644 --- a/app/serializers/commit_entity.rb +++ b/app/serializers/commit_entity.rb @@ -3,6 +3,10 @@ class CommitEntity < API::Entities::RepoCommit expose :author, using: UserEntity + expose :author_gravatar_url do |commit| + GravatarService.new.execute(commit.author_email) + end + expose :commit_url do |commit| namespace_project_tree_url( request.project.namespace, |