summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-04-04 17:23:43 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-04-04 17:23:43 +0200
commitbf9526739b5c90790907c1d8b9410dd339e3d395 (patch)
treecce5be3bbb11b2baf2e5fce5c2e49339e552a7ca /app/mailers
parent213ee62469c6518af8423f00fb902b7665d61204 (diff)
downloadgitlab-ce-bf9526739b5c90790907c1d8b9410dd339e3d395.tar.gz
Rebase repo check MR
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/repo_check_mailer.rb16
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