Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--app/workers/emails_on_push_worker.rb10
2 files changed, 10 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 25936eb1e1d..b133a3ec59b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -31,6 +31,7 @@ v 7.10.0 (unreleased)
- Replace commits calendar with faster contribution calendar that includes issues and merge requests
- Add inifinite scroll to user page activity
- Don't show commit comment button when user is not signed in.
+ - Fix EmailsOnPush.
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.
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"]