Class: RepositoryCheckMailer

Inherits:
BaseMailer
  • Object
show all
Defined in:
app/mailers/repository_check_mailer.rb

Instance Attribute Summary

Attributes inherited from BaseMailer

#current_user

Instance Method Summary collapse

Methods inherited from BaseMailer

#can?

Instance Method Details

#notify(failed_count) ⇒ Object


2
3
4
5
6
7
8
9
10
11
12
13
# File 'app/mailers/repository_check_mailer.rb', line 2

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

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