forked from Trustie/forgeplus
fixed repo_git_submodule_url ssh url
This commit is contained in:
parent
365345f15a
commit
f545615567
|
|
@ -324,9 +324,9 @@ module RepositoriesHelper
|
|||
def repo_git_submodule_url(owner, repo, path)
|
||||
unless (path.starts_with?('http://') || path.starts_with?('https://'))
|
||||
if path.starts_with?('git@code.gitlink.org.cn')
|
||||
path = path.gsub("git@code.gitlink.org.cn","https://gitlink.org.cn").gsub(":","/")
|
||||
path = path.gsub(":","/").gsub("git@code.gitlink.org.cn","https://gitlink.org.cn")
|
||||
elsif path.starts_with?('git@code.gitlink.org.cn')
|
||||
path = path.gsub("git@","https://").gsub(":","/")
|
||||
path = path.gsub(":","/").gsub("git@","https://")
|
||||
else
|
||||
path = File.expand_path(path, "/#{owner&.login}/#{repo&.identifier}")
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue