summaryrefslogtreecommitdiff
path: root/app/serializers/commit_entity.rb
blob: bc92a1c85455e8154ff1f200f856afdf74435c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class CommitEntity < API::Entities::RepoCommit
  include RequestAwareEntity

  expose :author, using: UserEntity

  expose :commit_path do |commit|
    namespace_project_tree_path(
      request.project.namespace,
      request.project,
      id: commit.id)
  end
end