gitlab-org--gitlab-foss/app/serializers/label_entity.rb

20 lines
373 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class LabelEntity < Grape::Entity
expose :id
2017-07-07 08:54:49 -04:00
expose :title
expose :color
expose :description
expose :group_id
expose :project_id
expose :template
2017-05-05 18:47:32 -04:00
expose :text_color
expose :created_at
expose :updated_at
2018-12-03 10:23:38 -05:00
expose :priority, if: -> (*) { options.key?(:project) } do |label|
label.priority(options[:project])
end
end