|
|
|
@@ -52,8 +52,8 @@ class Api::V1::Projects::SyncRepositories::CreateService < ApplicationService |
|
|
|
repository1 = Reposync::CreateSyncRepoService.call(repo_name(1), gitlink_repo_address, gitlink_token, external_repo_address, external_token, sync_granularity, 1) |
|
|
|
repository2 = Reposync::CreateSyncRepoService.call(repo_name(2), gitlink_repo_address, gitlink_token, external_repo_address, external_token, sync_granularity, 2) |
|
|
|
raise Error, '创建同步仓库失败' if repository1[0].to_i > 0 || repository2[0].to_i > 0 |
|
|
|
@sync_repository1 = SyncRepository.create!(project: project, type: type, repo_name: repo_name(1), external_repo_address: external_repo_address, sync_granularity: sync_granularity, sync_direction: 1) |
|
|
|
@sync_repository2 = SyncRepository.create!(project: project, type: type, repo_name: repo_name(2), external_repo_address: external_repo_address, sync_granularity: sync_granularity, sync_direction: 2) |
|
|
|
@sync_repository1 = SyncRepository.create!(project: project, type: type, repo_name: repo_name(1), external_repo_address: external_repo_address, external_token: external_token, sync_granularity: sync_granularity, sync_direction: 1) |
|
|
|
@sync_repository2 = SyncRepository.create!(project: project, type: type, repo_name: repo_name(2), external_repo_address: external_repo_address, external_token: external_token, sync_granularity: sync_granularity, sync_direction: 2) |
|
|
|
end |
|
|
|
|
|
|
|
def create_sync_repository_branch |
|
|
|
|