Browse Source

修复

pull/347/head
yystopf 2 years ago
parent
commit
1c1cceabbe
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/api/v1/projects/sync_repositories_controller.rb

+ 1
- 1
app/controllers/api/v1/projects/sync_repositories_controller.rb View File

@@ -82,7 +82,7 @@ class Api::V1::Projects::SyncRepositoriesController < Api::V1::BaseController
params[:sync_repository_ids].split(",").each do |id|
repo = SyncRepository.find_by_id id
Reposync::CreateSyncBranchService.call(repo.repo_name, params[:gitlink_branch_name], params[:external_branch_name])
branch = Reposync::CreateSyncBranchService.call(repo.repo_name, params[:gitlink_branch_name], params[:external_branch_name])
return render_error(branch[2]) if branch[0].to_i !=0
sync_branch = SyncRepositoryBranch.create!(sync_repository_id: id, gitlink_branch_name: params[:gitlink_branch_name], external_branch_name: params[:external_branch_name], reposync_branch_id: branch[1]['id'])
TouchSyncJob.perform_later(sync_branch) if params[:first_sync_direction].to_i == repo.sync_direction


Loading…
Cancel
Save