Merge branch 'develop' into standalone_develop

This commit is contained in:
2022-02-10 14:10:54 +08:00
3 changed files with 5 additions and 5 deletions

View File

@@ -5,10 +5,10 @@ class Ci::Repo < Ci::RemoteBase
has_one :perm, foreign_key: :perm_repo_uid
has_many :builds, foreign_key: :build_repo_id, dependent: :destroy
def self.find_with_namespace(namespace_path, identifier)
def self.find_with_namespace(namespace_path, identifier, user_login)
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
user = Ci::User.find_by_user_login namespace_path
user_login = user_login || namespace_path
user = Ci::User.find_by_user_login user_login
repo = Ci::Repo.where(repo_namespace: namespace_path, repo_name: identifier).first
[user, repo]