summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 21:08:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 21:08:06 +0000
commite1549c75843d235607aebac9ed64f2fd10e549ed (patch)
treed6b4213b87b57b323464c7e5c1b75091212f3373 /bin
parent5d75b2b9a9d11c20667895e6aa68ea4e76658c5d (diff)
downloadgitlab-ce-e1549c75843d235607aebac9ed64f2fd10e549ed.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'bin')
-rwxr-xr-xbin/secpick34
1 files changed, 5 insertions, 29 deletions
diff --git a/bin/secpick b/bin/secpick
index 603c6d2c05d..a68dabc8c47 100755
--- a/bin/secpick
+++ b/bin/secpick
@@ -12,10 +12,8 @@ module Secpick
BRANCH_PREFIX = 'security'.freeze
STABLE_SUFFIX = 'stable'.freeze
- DEFAULT_REMOTE = 'dev'.freeze
- SECURITY_REMOTE = 'security'.freeze
+ DEFAULT_REMOTE = 'security'.freeze
- NEW_MR_URL = 'https://dev.gitlab.org/gitlab/gitlabhq/-/merge_requests/new'.freeze
SECURITY_MR_URL = 'https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/new'.freeze
class SecurityFix
@@ -66,18 +64,10 @@ module Secpick
end
def new_mr_url
- if @options[:security_remote]
- if ee?
- SECURITY_MR_URL
- else
- SECURITY_MR_URL.sub('/gitlab/', '/gitlab-foss/')
- end
+ if ee?
+ SECURITY_MR_URL
else
- if ee?
- NEW_MR_URL.sub('gitlabhq', 'gitlab-ee')
- else
- NEW_MR_URL
- end
+ SECURITY_MR_URL.sub('/gitlab/', '/gitlab-foss/')
end
end
@@ -124,19 +114,10 @@ module Secpick
options[:sha] = sha
end
- opts.on('-r', '--remote abcd', 'Git remote name of dev.gitlab.org (optional, defaults to `dev`)') do |remote|
+ opts.on('-r', '--remote dev', "Git remote name of security repo (optional, defaults to `#{DEFAULT_REMOTE}`)") do |remote|
options[:remote] = remote
end
- opts.on('--security-remote', 'Use the new Security group-based workflow on gitlab.com (note: mutually exclusive to --remote)') do
- unless options[:remote].nil?
- abort('Cannot use --security-remote with --remote')
- end
-
- options[:security_remote] = true
- options[:remote] = SECURITY_REMOTE
- end
-
opts.on('-d', '--dry-run', 'Only show Git commands, without calling them') do
options[:try] = true
end
@@ -144,11 +125,6 @@ module Secpick
opts.on('-h', '--help', 'Displays Help') do
puts opts
- puts
- puts 'NOTE: If `--security-remote` is used, commands will default ' \
- 'to using a `security` remote, and merge requests will be created ' \
- 'on gitlab.com/gitlab-org/security/ rather than dev.gitlab.org.'
-
exit
end
end