diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-04 17:23:43 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-04 17:23:43 +0200 |
commit | bf9526739b5c90790907c1d8b9410dd339e3d395 (patch) | |
tree | cce5be3bbb11b2baf2e5fce5c2e49339e552a7ca /app/mailers | |
parent | 213ee62469c6518af8423f00fb902b7665d61204 (diff) | |
download | gitlab-ce-bf9526739b5c90790907c1d8b9410dd339e3d395.tar.gz |
Rebase repo check MR
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/repo_check_mailer.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/mailers/repo_check_mailer.rb b/app/mailers/repo_check_mailer.rb new file mode 100644 index 00000000000..d98533f120d --- /dev/null +++ b/app/mailers/repo_check_mailer.rb @@ -0,0 +1,16 @@ +class RepoCheckMailer < BaseMailer + include ActionView::Helpers::TextHelper + + 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: @message + ) + end +end |