Skip to content
代码片段 群组 项目
提交 4fdd1d73 编辑于 作者: jejacks0n's avatar jejacks0n
浏览文件

Allow experiment classed to not be namespaced

This is because all experiments are so far circumventing the rule, as
well as they may span an area of focus. The experiment feature flags
can be useful for this, or we can choose to solve this challenge in a
different and more nuanced way.
上级 f0df15eb
No related branches found
No related tags found
无相关合并请求
...@@ -666,6 +666,7 @@ Gitlab/NamespacedClass: ...@@ -666,6 +666,7 @@ Gitlab/NamespacedClass:
- 'ee/elastic/**/*.rb' - 'ee/elastic/**/*.rb'
- 'scripts/**/*' - 'scripts/**/*'
- 'spec/migrations/**/*.rb' - 'spec/migrations/**/*.rb'
- 'app/experiments/**/*_experiment.rb'
Lint/HashCompareByIdentity: Lint/HashCompareByIdentity:
Enabled: true Enabled: true
......
# frozen_string_literal: true # frozen_string_literal: true
class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/NamespacedClass class ApplicationExperiment < Gitlab::Experiment
def publish(_result = nil) def publish(_result = nil)
super super
......
# frozen_string_literal: true # frozen_string_literal: true
class CombinedRegistrationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class CombinedRegistrationExperiment < ApplicationExperiment
include Rails.application.routes.url_helpers include Rails.application.routes.url_helpers
def key_for(source, _ = nil) def key_for(source, _ = nil)
......
# frozen_string_literal: true # frozen_string_literal: true
class EmptyRepoUploadExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class EmptyRepoUploadExperiment < ApplicationExperiment
include ProjectCommitCount include ProjectCommitCount
TRACKING_START_DATE = DateTime.parse('2021/4/20') TRACKING_START_DATE = DateTime.parse('2021/4/20')
......
# frozen_string_literal: true # frozen_string_literal: true
class ForceCompanyTrialExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class ForceCompanyTrialExperiment < ApplicationExperiment
exclude :setup_for_personal exclude :setup_for_personal
private private
......
# frozen_string_literal: true # frozen_string_literal: true
class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment
exclude :has_environments? exclude :has_environments?
def control_behavior def control_behavior
......
# frozen_string_literal: true # frozen_string_literal: true
class NewProjectSastEnabledExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class NewProjectSastEnabledExperiment < ApplicationExperiment
def publish(_result = nil) def publish(_result = nil)
super super
......
# frozen_string_literal: true # frozen_string_literal: true
class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment
exclude :existing_user exclude :existing_user
EXPERIMENT_START_DATE = Date.new(2022, 1, 31) EXPERIMENT_START_DATE = Date.new(2022, 1, 31)
......
# frozen_string_literal: true # frozen_string_literal: true
class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment
def publish(_result = nil) def publish(_result = nil)
super super
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册