summaryrefslogtreecommitdiff
path: root/app/serializers/commit_entity.rb
blob: f7eba6fc1e34d8f54a6d1f672340b688c4e66af6 (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_url do |commit|
    namespace_project_tree_url(
      request.project.namespace,
      request.project,
      id: commit.id)
  end
end