Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 14:33:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 14:33:21 +0300
commit7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch)
tree5bdc2229f5198d516781f8d24eace62fc7e589e9 /lib/gitlab/feature_categories.rb
parent185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff)
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'lib/gitlab/feature_categories.rb')
-rw-r--r--lib/gitlab/feature_categories.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/feature_categories.rb b/lib/gitlab/feature_categories.rb
index d06f3b14fed..17586a94d7e 100644
--- a/lib/gitlab/feature_categories.rb
+++ b/lib/gitlab/feature_categories.rb
@@ -31,6 +31,14 @@ module Gitlab
category
end
+ def get!(feature_category)
+ return feature_category if valid?(feature_category)
+
+ raise "Unknown feature category: #{feature_category}" if Gitlab.dev_or_test_env?
+
+ FEATURE_CATEGORY_DEFAULT
+ end
+
def valid?(category)
categories.include?(category.to_s)
end