debian-mirror-gitlab/lib/api/entities/milestone.rb

21 lines
533 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module API
module Entities
class Milestone < Grape::Entity
expose :id, :iid
expose :project_id, if: -> (entity, options) { entity&.project_id }
expose :group_id, if: -> (entity, options) { entity&.group_id }
expose :title, :description
expose :state, :created_at, :updated_at
expose :due_date
expose :start_date
2023-03-04 22:38:38 +05:30
expose :expired
2020-03-13 15:44:24 +05:30
expose :web_url do |milestone, _options|
Gitlab::UrlBuilder.build(milestone)
end
end
end
end