summaryrefslogtreecommitdiff
path: root/bin/secpick
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-03 13:14:09 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-07 13:38:23 +0100
commitab714baf0eda645d95a79b57b5feffada1759d75 (patch)
treeea30d89f023ae3bcdb62e4913c7469375bc657d2 /bin/secpick
parentfde4eb7331d5902044ed5bd53c914cbb47e49eaa (diff)
downloadgitlab-ce-ab714baf0eda645d95a79b57b5feffada1759d75.tar.gz
Show a valid new merge request URL in EE case
Diffstat (limited to 'bin/secpick')
-rwxr-xr-xbin/secpick14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/secpick b/bin/secpick
index fa1c4003e75..e015cc562b7 100755
--- a/bin/secpick
+++ b/bin/secpick
@@ -27,11 +27,11 @@ parser = OptionParser.new do |opts|
options[:sha] = sha
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
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
end
@@ -100,6 +100,14 @@ class SecurityFix
}
end
+ def new_mr_url
+ if ee?
+ NEW_MR_URL.sub('gitlabhq', 'gitlab-ee')
+ else
+ NEW_MR_URL
+ end
+ end
+
def create!
if dry_run?
puts git_commands.join("\n").green
@@ -113,7 +121,7 @@ class SecurityFix
puts stderr.read&.red
if wait_thr.value.success?
- puts "#{NEW_MR_URL}?#{gitlab_params.to_query}".blue
+ puts "#{new_mr_url}?#{gitlab_params.to_query}".blue
end
stdin.close