summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 14:22:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 14:22:11 +0000
commit0c872e02b2c822e3397515ec324051ff540f0cd5 (patch)
treece2fb6ce7030e4dad0f4118d21ab6453e5938cdd /bin
parentf7e05a6853b12f02911494c4b3fe53d9540d74fc (diff)
downloadgitlab-ce-0c872e02b2c822e3397515ec324051ff540f0cd5.tar.gz
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'bin')
-rwxr-xr-xbin/audit-event-type24
-rwxr-xr-xbin/spring8
2 files changed, 18 insertions, 14 deletions
diff --git a/bin/audit-event-type b/bin/audit-event-type
index 8704dcfc0b0..fec34724c7c 100755
--- a/bin/audit-event-type
+++ b/bin/audit-event-type
@@ -36,7 +36,7 @@ class AuditEventTypeOptionParser
Options = Struct.new(
:name,
:description,
- :group,
+ :feature_category,
:milestone,
:saved_to_database,
:streamed,
@@ -71,9 +71,9 @@ class AuditEventTypeOptionParser
options.description = value
end
- opts.on('-g', '--group [string]', String,
-"Name of the group that introduced this audit event. For example, govern::compliance") do |value|
- options.group = value
+ opts.on('-c', '--feature-category [string]', String,
+"The feature category of this audit event. For example, compliance_management") do |value|
+ options.feature_category = value
end
opts.on('-M', '--milestone [string]', String,
@@ -145,16 +145,16 @@ class AuditEventTypeOptionParser
end
end
- def read_group
+ def read_feature_category
$stdout.puts
- $stdout.puts ">> Specify the group introducing the audit event type, like `govern::compliance`:"
+ $stdout.puts ">> Specify the feature category of this audit event, like `compliance_management`:"
loop do
- group = Readline.readline('?> ', false)&.strip
- group = nil if group.empty?
- return group unless group.nil?
+ feature_category = Readline.readline('?> ', false)&.strip
+ feature_category = nil if feature_category.empty?
+ return feature_category unless feature_category.nil?
- warn "group is a required field."
+ warn "feature_category is a required field."
end
end
@@ -231,7 +231,7 @@ class AuditEventTypeCreator
assert_existing_audit_event_type!
options.description ||= AuditEventTypeOptionParser.read_description
- options.group ||= AuditEventTypeOptionParser.read_group
+ options.feature_category ||= AuditEventTypeOptionParser.read_feature_category
options.milestone ||= AuditEventTypeOptionParser.read_milestone
options.saved_to_database = AuditEventTypeOptionParser.read_saved_to_database if options.saved_to_database.nil?
options.streamed = AuditEventTypeOptionParser.read_streamed if options.streamed.nil?
@@ -263,7 +263,7 @@ class AuditEventTypeCreator
{
'name' => options.name,
'description' => options.description,
- 'group' => options.group,
+ 'feature_category' => options.feature_category,
'milestone' => options.milestone,
'saved_to_database' => options.saved_to_database,
'streamed' => options.streamed,
diff --git a/bin/spring b/bin/spring
index 497ab099954..f3d9e81b53f 100755
--- a/bin/spring
+++ b/bin/spring
@@ -11,7 +11,11 @@ unless (defined?(Spring) || ENV['ENABLE_SPRING'] != '1') && File.basename($0) !=
spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
if spring
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
- gem 'spring', spring.version
- require 'spring/binstub'
+ begin
+ gem 'spring', spring.version
+ require 'spring/binstub'
+ rescue Gem::MissingSpecError => e
+ $stderr.puts 'INFO: Spring not available.'
+ end
end
end