mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增:仓库列表和分支列表
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
json.total_count @group_sync_repository_branch.keys.count
|
||||
json.sync_repository_branches @group_sync_repository_branch.each do |key|
|
||||
json.gitlink_branch_name key[0][0]
|
||||
json.external_branch_name key[0][1]
|
||||
branches = @sync_repository_branches.where(gitlink_branch_name: key[0][0], external_branch_name: key[0][1])
|
||||
branch = branches.last
|
||||
json.sync_time branch.sync_time
|
||||
json.sync_status branch.sync_status
|
||||
json.enable branch.enable
|
||||
json.reposync_branch_ids branches.pluck(:reposync_branch_id)
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
json.total_count @group_sync_repository.keys.count
|
||||
json.sync_repositories @group_sync_repository.each do |key|
|
||||
json.type key[0][0]
|
||||
json.external_repo_address key[0][1]
|
||||
json.sync_granularity key[0][2]
|
||||
json.sync_repository_ids @sync_repositories.where(type: key[0][0], external_repo_address: key[0][1], sync_granularity: key[0][2]).pluck(:id)
|
||||
end
|
||||
Reference in New Issue
Block a user