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:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-11-22 22:59:31 +0300
committerGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-08 10:43:09 +0300
commitd835fbc79f6cd6f17fc7472af48074805622a573 (patch)
treeaa46425badd616611d3d0ffaa1630d3db1f39da5 /lib/gitlab/email/message
parent9f2752e5dcc31dc4e9d91ee18caf1d36f1b7684e (diff)
Fix url helpers in RepositoryPush
Diffstat (limited to 'lib/gitlab/email/message')
-rw-r--r--lib/gitlab/email/message/repository_push.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/email/message/repository_push.rb b/lib/gitlab/email/message/repository_push.rb
index b0af3feee9e..bc8aece733f 100644
--- a/lib/gitlab/email/message/repository_push.rb
+++ b/lib/gitlab/email/message/repository_push.rb
@@ -16,6 +16,7 @@ module Gitlab
@project_id = project_id
@recipient = recipient
@opts = opts
+ @urls = Gitlab::Application.routes.url_helpers
@author_id = opts.delete(:author_id)
@ref = opts.delete(:ref)
@@ -85,17 +86,17 @@ module Gitlab
def target_url
if @action == :push
if commits.length > 1 && compare
- @notify.namespace_project_compare_url(project_namespace,
+ @urls.namespace_project_compare_url(project_namespace,
project,
from: Commit.new(compare.base, project),
to: Commit.new(compare.head, project))
else
- @notify.namespace_project_commit_url(project_namespace,
+ @urls.namespace_project_commit_url(project_namespace,
project, commits.first)
end
else
unless @action == :delete
- @notify.namespace_project_tree_url(project_namespace,
+ @urls.namespace_project_tree_url(project_namespace,
project, ref_name)
end
end