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:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-10-17 18:58:57 +0300
committerRémy Coutable <remy@rymai.me>2016-12-19 19:35:51 +0300
commit5d4531db2555d3051fc47e9268728a670ece95f9 (patch)
tree90c26002c5c804c6d3628f138bf1db60b4563d8c /app/helpers/import_helper.rb
parent60f61096e17dee7ebedd94cc5f70703067528bc7 (diff)
Gogs Importer
Diffstat (limited to 'app/helpers/import_helper.rb')
-rw-r--r--app/helpers/import_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/import_helper.rb b/app/helpers/import_helper.rb
index 021d2b14718..29df2703d52 100644
--- a/app/helpers/import_helper.rb
+++ b/app/helpers/import_helper.rb
@@ -8,6 +8,10 @@ module ImportHelper
link_to path_with_namespace, github_project_url(path_with_namespace), target: '_blank'
end
+ def gogs_project_link(path_with_namespace)
+ link_to path_with_namespace, gogs_project_url(path_with_namespace), target: '_blank'
+ end
+
private
def github_project_url(path_with_namespace)
@@ -20,4 +24,8 @@ module ImportHelper
provider = Gitlab.config.omniauth.providers.find { |p| p.name == 'github' }
@github_url = provider.fetch('url', 'https://github.com') if provider
end
+
+ def gogs_project_url(path_with_namespace)
+ "#{@gogs_root_url}/#{path_with_namespace}"
+ end
end