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

@@ -95,9 +95,9 @@ class Api::V1::Projects::SyncRepositoriesController < Api::V1::BaseController
return render_error("请输入正确的同步分支ID") unless params[:reposync_branch_ids]
@reposync_branch_logs = []
params[:reposync_branch_ids].split(",").each do |branch_id|
branch = SyncRepositoryBranch.find_by(reposync_branch_id: branch_id)
repo = branch.sync_repository
_, logs, _ = Reposync::GetLogsService.call(repo.repo_name, branch_id)
@branch = SyncRepositoryBranch.find_by(reposync_branch_id: branch_id)
repo = @branch&.sync_repository
_, logs, _ = Reposync::GetLogsService.call(repo&.repo_name, branch_id)
@reposync_branch_logs += logs
end
end