Welcome to mirror list, hosted at ThFree Co, Russian Federation.

commit_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c8dd98cc04d96177b15928829638fb5070981149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class CommitEntity < API::Entities::Commit
  include RequestAwareEntity

  expose :author, using: UserEntity

  expose :author_gravatar_url do |commit|
    GravatarService.new.execute(commit.author_email)
  end

  expose :commit_url do |commit|
    project_commit_url(request.project, commit)
  end

  expose :commit_path do |commit|
    project_commit_path(request.project, commit)
  end
end