merge from develop

This commit is contained in:
2023-02-07 14:21:32 +08:00
4 changed files with 30 additions and 2 deletions

View File

@@ -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