|
|
|
@@ -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] |
|
|
|
|