diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-26 21:25:19 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-26 21:25:19 +0300 |
commit | a94f8a3c5e00f137eacfb7fda54157cb4fb77b5f (patch) | |
tree | a813e9abe9edd2c6bd7a297a150c5e397d287f13 /app | |
parent | b8164321fedfd17479ce7ac0b4961bf1e5929da0 (diff) | |
parent | 329db2c5dedbddace96af2c343443dcba52c170b (diff) |
Merge branch 'fix-emailsonpush' into 'master'
Fix EmailsOnPush.
See private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2185.
See merge request !459
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/emails_on_push_worker.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb index 89fa2117dd2..1d21addece6 100644 --- a/app/workers/emails_on_push_worker.rb +++ b/app/workers/emails_on_push_worker.rb @@ -1,7 +1,15 @@ class EmailsOnPushWorker include Sidekiq::Worker - def perform(project_id, recipients, push_data, send_from_committer_email: false, disable_diffs: false) + def perform(project_id, recipients, push_data, options = {}) + options.symbolize_keys! + options.reverse_merge!( + send_from_committer_email: false, + disable_diffs: false + ) + send_from_committer_email = options[:send_from_committer_email] + disable_diffs = options[:disable_diffs] + project = Project.find(project_id) before_sha = push_data["before"] after_sha = push_data["after"] |