debian-mirror-gitlab/app/serializers/merge_request_metrics_entity.rb
2023-03-05 14:24:40 +05:30

12 lines
357 B
Ruby

# frozen_string_literal: true
class MergeRequestMetricsEntity < Grape::Entity
format_with(:iso8601) do |item|
item.try(:iso8601)
end
expose :latest_closed_at, as: :closed_at, format_with: :iso8601
expose :merged_at, format_with: :iso8601
expose :latest_closed_by, as: :closed_by, using: UserEntity
expose :merged_by, using: UserEntity
end