Browse Source

fixed reposyncer同步仓库接口增加gitlink

pull/313/head
“xxq250” 3 years ago
parent
commit
b3d78741a3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/ob_repository_syncs_controller.rb

+ 2
- 2
app/controllers/ob_repository_syncs_controller.rb View File

@@ -13,8 +13,8 @@ class ObRepositorySyncsController < ApplicationController
tip_exception "参数错误" if params[:github_address].blank? && params[:gitee_address].blank?
project_name ="#{@project.owner.name}:#{@project.identifier}"
service = ObRepositorySync::ApiService.new(project_name)
params = params.merge({ "gitlink_address": @project.repository.url })
res = service.create_projects(params)
project_params = params.merge({ "gitlink_address": @project.repository.url })
res = service.create_projects(project_params)
tip_exception "保存失败: #{res["msg"]}" if res["code"].to_s != "200"
sync_id = res["data"]["id"]
ob_repository_sync = ObRepositorySync.find_or_initialize_by(project_id: @project.id)


Loading…
Cancel
Save