From b3d78741a3dca55e8ca3228bd2568b22af9d506d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxxq250=E2=80=9D?= <“xxq250@qq.com”> Date: Thu, 28 Jul 2022 09:31:14 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20reposyncer=E5=90=8C=E6=AD=A5=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0gitlink?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ob_repository_syncs_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/ob_repository_syncs_controller.rb b/app/controllers/ob_repository_syncs_controller.rb index 0f1c64b1b..107320934 100644 --- a/app/controllers/ob_repository_syncs_controller.rb +++ b/app/controllers/ob_repository_syncs_controller.rb @@ -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)