FIX migration project accelerator's bug
This commit is contained in:
parent
2f9d583fac
commit
c627ea6c19
|
@ -2,7 +2,7 @@ module Acceleratorable
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
def enable_accelerator?(clone_addr)
|
||||
clone_addr.include?(github_domain) || clone_addr.include?(gitlab_domain)
|
||||
is_foreign_url?(clone_addr) && config_accelerator?
|
||||
end
|
||||
|
||||
def accelerator_url(repo_name)
|
||||
|
@ -25,4 +25,12 @@ module Acceleratorable
|
|||
Gitea.gitea_config[:accelerator]["access_key_id"]
|
||||
end
|
||||
|
||||
def config_accelerator?
|
||||
Gitea.gitea_config[:accelerator].present?
|
||||
end
|
||||
|
||||
def is_foreign_url?(clone_addr)
|
||||
clone_addr.include?(github_domain) || clone_addr.include?(gitlab_domain)
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue