BigW Consortium Gitlab

repository_check_mailer.rb 361 Bytes
Newer Older
1
class RepositoryCheckMailer < BaseMailer
Jacob Vosmaer committed
2 3 4 5 6 7 8 9 10
  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),
11
      subject: "GitLab Admin | #{@message}"
Jacob Vosmaer committed
12 13 14
    )
  end
end