mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
merge from develop
This commit is contained in:
@@ -213,5 +213,13 @@ module RepositoriesHelper
|
||||
def tmp_dir
|
||||
"repo"
|
||||
end
|
||||
|
||||
|
||||
def repo_git_submodule_url(owner, repo, path)
|
||||
unless (path.starts_with?('http://') || path.starts_with?('https://'))
|
||||
path = File.expand_path(path, "#{base_url}/#{owner&.login}/#{repo&.identifier}")
|
||||
path = path.split("#{Rails.root}/")[1]
|
||||
end
|
||||
|
||||
return path
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user