From 64147444fd20874d762942b4359580aa4c01f768 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 20 Nov 2019 16:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=81=E5=AF=86=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/gits_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index c9659302e..e87f3302f 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -49,6 +49,10 @@ class GitsController < ApplicationController repo_name = username + "/" + shixunname uid_logger("git start: repo_name is #{repo_name}") shixun = Shixun.select([:id, :user_id, :repo_name, :identifier]).where(repo_name: repo_name).first + if shixun.blank? + shixun_id = ShixunSecretRepository.where(repo_name: repo_name).pluck(:shixun_id).first + shixun = Shixun.select([:id, :user_id, :repo_name, :identifier]).find_by(id: shixun_id) + end uid_logger("git start auth: shixun identifier is #{shixun.try(:identifier)}") uid_logger("git start auth: systemuser is #{system_user.try(:login)}")