debian-mirror-gitlab/lib/api/entities/resource_label_event.rb
2020-03-13 15:44:24 +05:30

19 lines
456 B
Ruby

# frozen_string_literal: true
module API
module Entities
class ResourceLabelEvent < Grape::Entity
expose :id
expose :user, using: Entities::UserBasic
expose :created_at
expose :resource_type do |event, options|
event.issuable.class.name
end
expose :resource_id do |event, options|
event.issuable.id
end
expose :label, using: Entities::LabelBasic
expose :action
end
end
end