From 9f2752e5dcc31dc4e9d91ee18caf1d36f1b7684e Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Sat, 21 Nov 2015 20:54:19 +0100 Subject: Remove obsolete variables in `repository_push_email` --- app/mailers/emails/projects.rb | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'app/mailers') diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index bedadb583c7..35015ca34f8 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -60,28 +60,13 @@ module Emails end def repository_push_email(project_id, recipient, opts = {}) - repository_push = + @message = Gitlab::Email::Message::RepositoryPush.new(self, project_id, recipient, opts) - @project = repository_push.project - @current_user = @author = repository_push.author - @compare = repository_push.compare - @ref_name = repository_push.ref_name - @ref_type = repository_push.ref_type - @action = repository_push.action - @action_name = repository_push.action_name - @commits = repository_push.commits - @diffs = repository_push.diffs - @target_url = repository_push.target_url - @disable_diffs = repository_push.disable_diffs? - @reverse_compare = repository_push.reverse_compare? - @disable_footer = true - - mail(from: sender(repository_push.author_id, - repository_push.send_from_committer_email?), - reply_to: repository_push.reply_to, - to: repository_push.recipient, - subject: repository_push.subject) + mail(from: sender(@message.author_id, @message.send_from_committer_email?), + reply_to: @message.reply_to, + to: @message.recipient, + subject: @message.subject) end end end -- cgit v1.2.3