新增:仓库列表和分支列表

This commit is contained in:
2024-04-17 10:54:23 +08:00
parent 7271603248
commit 8b1ef7bf15
7 changed files with 39 additions and 5 deletions

View File

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

View File

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