BigW Consortium Gitlab

repository_check_mailer.rb 364 Bytes
Newer Older
1
class RepositoryCheckMailer < BaseMailer
Jacob Vosmaer committed
2
  def notify(failed_count)
Douwe Maan committed
3 4 5 6 7 8
    @message =
      if failed_count == 1
        "One project failed its last repository check"
      else
        "#{failed_count} projects failed their last repository check"
      end
Jacob Vosmaer committed
9 10 11

    mail(
      to: User.admins.pluck(:email),
12
      subject: "GitLab Admin | #{@message}"
Jacob Vosmaer committed
13 14 15
    )
  end
end