Commit 553f3aba authored by Marin Jankovski's avatar Marin Jankovski

Remove duplicated calls.

parent 4c68d238
......@@ -216,12 +216,7 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
message = if sanitize
"#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
print message
print sanitized_message(project)
if project.satellite.exists?
puts "yes".green
......@@ -530,12 +525,7 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
message = if sanitize
"#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
print message
print sanitized_message(project)
if project.empty_repo?
puts "repository is empty".magenta
......@@ -598,12 +588,7 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
message = if sanitize
"#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
print message
print sanitized_message(project)
if project.namespace
puts "yes".green
......@@ -853,6 +838,14 @@ namespace :gitlab do
Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
end
def sanitized_message(project)
if sanitize
"#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
end
def sanitize
if ENV['SANITIZE'] == "true"
true
......
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