This instance will be upgraded to Heptapod 0.27.1 on 2021-12-08 at 22:00 UTC+1 (a few minutes of down time)

Commit 341c1181 authored by James Lopez's avatar James Lopez
Browse files

refactor project to include some nicer EE stuff

parent 650bdbe544a9
......@@ -204,7 +204,7 @@ def update_forks_visibility_level
state :finished
state :failed
after_transition any => :finished, do: :clear_import_data
after_transition any => :finished, do: :reset_cache_and_import_attrs
end
class << self
......@@ -360,7 +360,7 @@ def add_import_job
end
end
def clear_import_data
def reset_cache_and_import_attrs
update(import_error: nil)
ProjectCacheWorker.perform_async(self.id)
......@@ -426,12 +426,7 @@ def import_finished?
end
def safe_import_url
result = URI.parse(self.import_url)
result.password = '*****' unless result.password.nil?
result.user = '*****' unless result.user.nil? || result.user == "git" #tokens or other data may be saved as user
result.to_s
rescue
self.import_url
Gitlab::UrlSanitizer.new(import_url).masked_url
end
def check_limit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment