gitlab-org--gitlab-foss/app/serializers/analytics_commit_entity.rb
2018-07-23 11:27:39 -07:00

15 lines
305 B
Ruby

# frozen_string_literal: true
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