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
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-10 06:12:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-10 06:12:01 +0300
commitfea86fb8bf2339727de5e91ccf17ab105e993dca (patch)
tree25ddd67b8131643fa648f052eb29d527d72bdda3 /config
parentec4891efa777d951afdbff95557bbcf5fda00188 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/feature_flags/gitlab_com_derisk/enhanced_review_email.yml9
-rw-r--r--config/initializers/fog_google_list_objects_match_glob_support.rb52
2 files changed, 61 insertions, 0 deletions
diff --git a/config/feature_flags/gitlab_com_derisk/enhanced_review_email.yml b/config/feature_flags/gitlab_com_derisk/enhanced_review_email.yml
new file mode 100644
index 00000000000..71bdc424ec2
--- /dev/null
+++ b/config/feature_flags/gitlab_com_derisk/enhanced_review_email.yml
@@ -0,0 +1,9 @@
+---
+name: enhanced_review_email
+feature_issue_url:
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/141187
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/437582
+milestone: '16.8'
+group: group::code review
+type: gitlab_com_derisk
+default_enabled: false
diff --git a/config/initializers/fog_google_list_objects_match_glob_support.rb b/config/initializers/fog_google_list_objects_match_glob_support.rb
new file mode 100644
index 00000000000..37eacf33743
--- /dev/null
+++ b/config/initializers/fog_google_list_objects_match_glob_support.rb
@@ -0,0 +1,52 @@
+# frozen_string_literal: true
+
+# We force require this to trigger the autoload and so that our monkeypatch will
+# be applied in correct order, which is only after the class is loaded.
+require 'fog/storage/google_json/requests/list_objects'
+
+#
+# Monkey patching the list_objects to support match_glob parameter
+# See https://github.com/fog/fog-google/issues/614
+#
+module Fog
+ module Storage
+ class GoogleJSON
+ class Real
+ # This an identical copy of
+ # https://github.com/fog/fog-google/blob/v1.19.0/lib/fog/storage/google_json/requests/list_objects.rb
+ # with just match_glob added to the allowed_opts
+ def list_objects(bucket, options = {})
+ # rubocop: disable Style/PercentLiteralDelimiters -- this is an exact copy of the original method, just added match_glob here.
+ allowed_opts = %i(
+ delimiter
+ match_glob
+ max_results
+ page_token
+ prefix
+ projection
+ versions
+ )
+ # rubocop: enable Style/PercentLiteralDelimiters
+
+ # rubocop: disable Gitlab/ModuleWithInstanceVariables -- this is an exact copy of the original method
+ @storage_json.list_objects(
+ bucket,
+ **options.select { |k, _| allowed_opts.include? k }
+ )
+ # rubocop: enable Gitlab/ModuleWithInstanceVariables
+ end
+ end
+ end
+ end
+end
+
+# We just need to add the match_glob attribute support here
+module Fog
+ module Storage
+ class GoogleJSON
+ class Files < Fog::Collection
+ attribute :match_glob, aliases: "matchGlob"
+ end
+ end
+ end
+end