Commit dedea067 authored by Sean Arnold's avatar Sean Arnold

Use owners_and_maintainers_without_invites method

- Use maintainers over masters
parent ced9b0ca
...@@ -38,13 +38,7 @@ module EE ...@@ -38,13 +38,7 @@ module EE
def mirror_was_hard_failed(project) def mirror_was_hard_failed(project)
return if project.emails_disabled? return if project.emails_disabled?
recipients = project.members.active_without_invites_and_requests.owners_and_maintainers owners_and_maintainers_without_invites.each do |recipient|
if recipients.empty? && project.group
recipients = project.group.members.active_without_invites_and_requests.owners_and_maintainers
end
recipients.each do |recipient|
mailer.mirror_was_hard_failed_email(project.id, recipient.user.id).deliver_later mailer.mirror_was_hard_failed_email(project.id, recipient.user.id).deliver_later
end end
end end
...@@ -78,10 +72,10 @@ module EE ...@@ -78,10 +72,10 @@ module EE
private private
def owners_and_maintainers_without_invites(project) def owners_and_maintainers_without_invites(project)
recipients = project.members.active_without_invites_and_requests.owners_and_masters recipients = project.members.active_without_invites_and_requests.owners_and_maintainers
if recipients.empty? && project.group if recipients.empty? && project.group
recipients = project.group.members.active_without_invites_and_requests.owners_and_masters recipients = project.group.members.active_without_invites_and_requests.owners_and_maintainers
end end
recipients recipients
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment