debian-mirror-gitlab/app/serializers/merge_request_sidebar_extras_entity.rb

12 lines
414 B
Ruby
Raw Normal View History

2019-07-31 22:56:46 +05:30
# frozen_string_literal: true
class MergeRequestSidebarExtrasEntity < IssuableSidebarExtrasEntity
expose :assignees do |merge_request|
2021-02-22 17:27:13 +05:30
MergeRequestUserEntity.represent(merge_request.assignees, merge_request: merge_request)
2019-07-31 22:56:46 +05:30
end
2020-11-24 15:15:51 +05:30
expose :reviewers, if: -> (m) { m.allows_reviewers? } do |merge_request|
2021-02-22 17:27:13 +05:30
MergeRequestUserEntity.represent(merge_request.reviewers, merge_request: merge_request)
2020-11-24 15:15:51 +05:30
end
2019-07-31 22:56:46 +05:30
end