debian-mirror-gitlab/app/serializers/merge_request_basic_entity.rb
2021-01-03 14:25:43 +05:30

16 lines
610 B
Ruby

# frozen_string_literal: true
class MergeRequestBasicEntity < Grape::Entity
expose :title
expose :public_merge_status, as: :merge_status
expose :merge_error
expose :state
expose :source_branch_exists?, as: :source_branch_exists
expose :rebase_in_progress?, as: :rebase_in_progress
expose :milestone, using: API::Entities::Milestone
expose :labels, using: LabelEntity
expose :assignees, using: API::Entities::UserBasic
expose :reviewers, if: -> (m) { m.allows_reviewers? }, using: API::Entities::UserBasic
expose :task_status, :task_status_short
expose :lock_version, :lock_version
end