debian-mirror-gitlab/app/serializers/analytics_commit_entity.rb
2017-08-17 22:00:37 +05:30

13 lines
274 B
Ruby

class AnalyticsCommitEntity < CommitEntity
include EntityDateHelper
expose :short_id, as: :short_sha
expose :total_time do |commit|
distance_of_time_as_hash(request.total_time.to_f)
end
unexpose :author_name
unexpose :author_email
unexpose :message
end