Module: NotificationRecipients::BuildService

Defined in:
app/services/notification_recipients/build_service.rb

Class Method Summary collapse

Class Method Details

.build_merge_request_unmergeable_recipientsObject



24
25
26
# File 'app/services/notification_recipients/build_service.rb', line 24

def self.build_merge_request_unmergeable_recipients(...)
  ::NotificationRecipients::Builder::MergeRequestUnmergeable.new(...).notification_recipients
end

.build_new_note_recipientsObject



20
21
22
# File 'app/services/notification_recipients/build_service.rb', line 20

def self.build_new_note_recipients(...)
  ::NotificationRecipients::Builder::NewNote.new(...).notification_recipients
end

.build_new_review_recipientsObject



32
33
34
# File 'app/services/notification_recipients/build_service.rb', line 32

def self.build_new_review_recipients(...)
  ::NotificationRecipients::Builder::NewReview.new(...).notification_recipients
end

.build_project_maintainers_recipients(target, **args) ⇒ Object



28
29
30
# File 'app/services/notification_recipients/build_service.rb', line 28

def self.build_project_maintainers_recipients(target, **args)
  ::NotificationRecipients::Builder::ProjectMaintainers.new(target, **args).notification_recipients
end

.build_recipients(target, current_user, **args) ⇒ Object



16
17
18
# File 'app/services/notification_recipients/build_service.rb', line 16

def self.build_recipients(target, current_user, **args)
  ::NotificationRecipients::Builder::Default.new(target, current_user, **args).notification_recipients
end

.build_requested_review_recipientsObject



36
37
38
# File 'app/services/notification_recipients/build_service.rb', line 36

def self.build_requested_review_recipients(...)
  ::NotificationRecipients::Builder::RequestReview.new(...).notification_recipients
end

.notifiable?(user, *args) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/services/notification_recipients/build_service.rb', line 12

def self.notifiable?(user, *args)
  NotificationRecipient.new(user, *args).notifiable?
end

.notifiable_users(users, *args) ⇒ Object



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

def self.notifiable_users(users, *args)
  users.compact.map { |u| NotificationRecipient.new(u, *args) }.select(&:notifiable?).map(&:user)
end