新增:分支列表分支信息以及gitlink admin token

This commit is contained in:
2024-04-23 17:42:26 +08:00
parent 946b449d9d
commit 81d39588c6
4 changed files with 11 additions and 6 deletions

View File

@@ -97,6 +97,8 @@ class Api::V1::Projects::SyncRepositories::CreateService < ApplicationService
end
def gitlink_repo_address
"#{EduSetting.get("gitlink_repo_domain")}/#{project.owner&.login}/#{project.identifier}.git"
internal_repo_address = "#{EduSetting.get("gitlink_repo_domain")}/#{project.owner&.login}/#{project.identifier}.git"
body = internal_repo_address.split("https://")[1]
return "https://oauth2:#{EduSetting.get("gitlink_admin_token")}@#{body}"
end
end