diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-25 14:29:49 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-25 14:29:49 +0100 |
commit | 85af3e82bfe0ebd01e816ee7c5ee6a2c28ce8ff9 (patch) | |
tree | 9785baef8d54dbea21aceb18803ae9706cd63ae8 /app/workers | |
parent | e0c186c35735a2dc9e05e88ad9975ae016c815d9 (diff) | |
download | gitlab-ce-85af3e82bfe0ebd01e816ee7c5ee6a2c28ce8ff9.tar.gz |
Add option to disable code diffs to EmailOnPush.
See #1950
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/emails_on_push_worker.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb index 3814b17a8a2..309772cb5ce 100644 --- a/app/workers/emails_on_push_worker.rb +++ b/app/workers/emails_on_push_worker.rb @@ -1,7 +1,7 @@ class EmailsOnPushWorker include Sidekiq::Worker - def perform(project_id, recipients, push_data, send_from_committer_email = false) + def perform(project_id, recipients, push_data, send_from_committer_email = false, disable_diffs = false) project = Project.find(project_id) before_sha = push_data["before"] after_sha = push_data["after"] @@ -19,7 +19,15 @@ class EmailsOnPushWorker return false unless compare && compare.commits.present? recipients.split(" ").each do |recipient| - Notify.repository_push_email(project_id, recipient, author_id, branch, compare, send_from_committer_email).deliver + Notify.repository_push_email( + project_id, + recipient, + author_id, + branch, + compare, + send_from_committer_email, + disable_diffs + ).deliver end ensure compare = nil |