debian-mirror-gitlab/app/services/notification_recipients/builder/request_review.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
521 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
module NotificationRecipients
module Builder
class RequestReview < Base
attr_reader :merge_request, :current_user, :reviewer
def initialize(merge_request, current_user, reviewer)
2021-04-29 21:17:54 +05:30
@merge_request = merge_request
@current_user = current_user
@reviewer = reviewer
2021-03-11 19:13:27 +05:30
end
def target
merge_request
end
def build!
add_recipients(reviewer, :mention, NotificationReason::REVIEW_REQUESTED)
end
end
end
end