From f545615567866b75f513bcda2bdc418da5a88084 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Sun, 28 Sep 2025 11:33:18 +0800 Subject: [PATCH] fixed repo_git_submodule_url ssh url --- app/helpers/repositories_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 6ffa77cc4..a855dfdf1 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -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