diff options
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 |