summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-11-21 20:54:19 +0100
committerGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-08 08:43:08 +0100
commit9f2752e5dcc31dc4e9d91ee18caf1d36f1b7684e (patch)
treee40c621edbf2a0ee6dc9bd0e8ec7ea97d823e903 /app/mailers
parent4beba7494b096f2540b19017bb7c1c8e91679135 (diff)
downloadgitlab-ce-9f2752e5dcc31dc4e9d91ee18caf1d36f1b7684e.tar.gz
Remove obsolete variables in `repository_push_email`
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/projects.rb25
1 files changed, 5 insertions, 20 deletions
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