diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-10-17 17:58:57 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-19 17:35:51 +0100 |
commit | 5d4531db2555d3051fc47e9268728a670ece95f9 (patch) | |
tree | 90c26002c5c804c6d3628f138bf1db60b4563d8c /app/helpers/import_helper.rb | |
parent | 60f61096e17dee7ebedd94cc5f70703067528bc7 (diff) | |
download | gitlab-ce-5d4531db2555d3051fc47e9268728a670ece95f9.tar.gz |
Gogs Importer
Diffstat (limited to 'app/helpers/import_helper.rb')
-rw-r--r-- | app/helpers/import_helper.rb | 8 |
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 |