forked from Trustie/forgeplus
Merge remote-tracking branch 'origin/dev_osredm_server' into dev_osredm_server
# Conflicts: # app/services/api/v1/projects/sync_repositories/create_service.rb
This commit is contained in:
commit
27332da69b
|
|
@ -74,9 +74,10 @@ class Api::V1::Projects::SyncRepositories::CreateService < ApplicationService
|
|||
|
||||
def create_webhook
|
||||
url = ""
|
||||
if type == "SyncRepositories::Gitee"
|
||||
case type
|
||||
when 'SyncRepositories::Gitee'
|
||||
url = "#{Rails.application.config_for(:configuration)['platform_url']}/api/v1/#{project&.owner&.login}/#{project&.identifier}/sync_repositories/sync?sync_direction=1&repo_type=SyncRepositories::Gitee"
|
||||
elsif type == "SyncRepositories::Gitlink"
|
||||
when 'SyncRepositories::Gitlink'
|
||||
url = "#{Rails.application.config_for(:configuration)['platform_url']}/api/v1/#{project&.owner&.login}/#{project&.identifier}/sync_repositories/sync?sync_direction=1&repo_type=SyncRepositories::Gitlink"
|
||||
else
|
||||
url = "#{Rails.application.config_for(:configuration)['platform_url']}/api/v1/#{project&.owner&.login}/#{project&.identifier}/sync_repositories/sync?sync_direction=1&repo_type=SyncRepositories::Github"
|
||||
|
|
@ -94,9 +95,10 @@ class Api::V1::Projects::SyncRepositories::CreateService < ApplicationService
|
|||
end
|
||||
|
||||
def repo_name(sync_direction)
|
||||
if type == "SyncRepositories::Gitee"
|
||||
case type
|
||||
when 'SyncRepositories::Gitee'
|
||||
return "gitee:#{project.id}:#{sync_granularity}:#{sync_direction}"
|
||||
elsif type == "SyncRepositories::Gitlink"
|
||||
when 'SyncRepositories::Gitlink'
|
||||
return "gitlink:#{project.id}:#{sync_granularity}:#{sync_direction}"
|
||||
else
|
||||
return "github:#{project.id}:#{sync_granularity}:#{sync_direction}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue