Class: NotificationRecipients::Builder::MergeRequestUnmergeable

Inherits:
Base
  • Object
show all
Defined in:
app/services/notification_recipients/builder/merge_request_unmergeable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#add_recipients, #filter!, #group, #make_recipient, #notification_recipients, #project, #recipients, #recipients_target, #user_scope

Constructor Details

#initialize(merge_request) ⇒ MergeRequestUnmergeable

Returns a new instance of MergeRequestUnmergeable.



8
9
10
# File 'app/services/notification_recipients/builder/merge_request_unmergeable.rb', line 8

def initialize(merge_request)
  @target = merge_request
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



6
7
8
# File 'app/services/notification_recipients/builder/merge_request_unmergeable.rb', line 6

def target
  @target
end

Instance Method Details

#acting_userObject



22
23
24
# File 'app/services/notification_recipients/builder/merge_request_unmergeable.rb', line 22

def acting_user
  nil
end

#build!Object



12
13
14
15
16
# File 'app/services/notification_recipients/builder/merge_request_unmergeable.rb', line 12

def build!
  target.merge_participants.each do |user|
    add_recipients(user, :participating, nil)
  end
end

#custom_actionObject



18
19
20
# File 'app/services/notification_recipients/builder/merge_request_unmergeable.rb', line 18

def custom_action
  :unmergeable_merge_request
end