新增:分支列表分支信息以及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

@@ -1,5 +1,5 @@
json.gitlink_repo_address "#{EduSetting.get("gitlink_repo_domain")}/#{@project.owner&.login}/#{@project.identifier}.git"
json.external_repo_address @sync_repository1.external_repo_address
json.sync_granularity @sync_repository1.sync_granularity
json.gitlink_branch_name @sync_repository_branch1.gitlink_branch_name
json.external_branch_name @sync_repository_branch1.external_branch_name
json.gitlink_branch_name @sync_repository_branch1&.gitlink_branch_name
json.external_branch_name @sync_repository_branch1&.external_branch_name

View File

@@ -1,4 +1,7 @@
json.total_count @reposync_branch_logs.count
json.gitlink_branch_name @branch&.gitlink_branch_name
json.external_type @branch&.repository&.type
json.external_branch_name @branch&.external_branch_name
json.logs @reposync_branch_logs.each do |log|
type = log['repo_name'].start_with?('gitee') ? 'gitee' : 'github'
json.change_from log['sync_direct'] == "to_inter" ? type : 'gitlink'