fix: migrate use old rule

This commit is contained in:
2022-02-11 16:27:22 +08:00
parent 298abdd1b1
commit 29dc3fff39
2 changed files with 17 additions and 17 deletions

View File

@@ -8,7 +8,7 @@ class Ci::Repo < Ci::RemoteBase
def self.find_with_namespace(namespace_path, identifier, user_login)
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
user_login = user_login || namespace_path
user = Ci::User.find_by_user_login user_login
user = Ci::User.find_by(user_login: user_login)
repo = Ci::Repo.where(repo_namespace: namespace_path, repo_name: identifier).first
[user, repo]