BigW Consortium Gitlab

commit_entity.rb 393 Bytes
Newer Older
1
class CommitEntity < API::Entities::Commit
2 3
  include RequestAwareEntity

4
  expose :author, using: UserEntity
5

6 7 8 9
  expose :author_gravatar_url do |commit|
    GravatarService.new.execute(commit.author_email)
  end

10
  expose :commit_url do |commit|
11
    project_commit_url(request.project, commit)
12
  end
13

14
  expose :commit_path do |commit|
15
    project_commit_path(request.project, commit)
16 17
  end
end