gitlab-org--gitlab-foss/app/mailers/repository_check_mailer.rb

15 lines
361 B
Ruby
Raw Normal View History

2016-04-06 07:47:05 -04:00
class RepositoryCheckMailer < BaseMailer
2016-04-04 11:23:43 -04:00
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),
2016-04-18 04:58:40 -04:00
subject: "GitLab Admin | #{@message}"
2016-04-04 11:23:43 -04:00
)
end
end