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

Remove duplicated calls.

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