Commit ab714baf authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Show a valid new merge request URL in EE case

parent fde4eb73
...@@ -27,11 +27,11 @@ parser = OptionParser.new do |opts| ...@@ -27,11 +27,11 @@ parser = OptionParser.new do |opts|
options[:sha] = sha options[:sha] = sha
end end
opts.on('-r', '--remote abcd', 'Git remote name of dev.gitlab.org (optional, default to `dev`)') do |remote| opts.on('-r', '--remote abcd', 'Git remote name of dev.gitlab.org (optional, defaults to `dev`)') do |remote|
options[:remote] = remote options[:remote] = remote
end end
opts.on('-d', '--dry-run', 'Show resulting Git commands without calling them') do |remote| opts.on('-d', '--dry-run', 'Only show Git commands, without calling them') do |remote|
options[:try] = true options[:try] = true
end end
...@@ -100,6 +100,14 @@ class SecurityFix ...@@ -100,6 +100,14 @@ class SecurityFix
} }
end end
def new_mr_url
if ee?
NEW_MR_URL.sub('gitlabhq', 'gitlab-ee')
else
NEW_MR_URL
end
end
def create! def create!
if dry_run? if dry_run?
puts git_commands.join("\n").green puts git_commands.join("\n").green
...@@ -113,7 +121,7 @@ class SecurityFix ...@@ -113,7 +121,7 @@ class SecurityFix
puts stderr.read&.red puts stderr.read&.red
if wait_thr.value.success? if wait_thr.value.success?
puts "#{NEW_MR_URL}?#{gitlab_params.to_query}".blue puts "#{new_mr_url}?#{gitlab_params.to_query}".blue
end end
stdin.close stdin.close
......
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