Class: RepositoryCheckMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/repository_check_mailer.rb

Instance Attribute Summary

Attributes inherited from ApplicationMailer

#current_user

Instance Method Summary collapse

Methods inherited from ApplicationMailer

#can?

Instance Method Details

#notify(failed_count) ⇒ Object


9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/mailers/repository_check_mailer.rb', line 9

def notify(failed_count)
  @message =
    if failed_count == 1
      "One project failed its last repository check"
    else
      "#{failed_count} projects failed their last repository check"
    end

  mail(
    to: User.admins.active.pluck(:email),
    subject: "GitLab Admin | #{@message}"
  )
end