Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
52d6f7d0
Commit
52d6f7d0
authored
Sep 15, 2021
by
Jeremy Jackson
Committed by
Igor Drozdov
Sep 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds the security_reports_mr_widget_prompt experiment for a front end feature
parent
0c561756
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
app/experiments/security_reports_mr_widget_prompt_experiment.rb
...periments/security_reports_mr_widget_prompt_experiment.rb
+14
-0
config/feature_flags/experiment/security_reports_mr_widget_prompt.yml
...re_flags/experiment/security_reports_mr_widget_prompt.yml
+8
-0
ee/app/controllers/ee/projects/merge_requests_controller.rb
ee/app/controllers/ee/projects/merge_requests_controller.rb
+1
-0
spec/experiments/security_reports_mr_widget_prompt_experiment_spec.rb
...ents/security_reports_mr_widget_prompt_experiment_spec.rb
+15
-0
No files found.
app/experiments/security_reports_mr_widget_prompt_experiment.rb
0 → 100644
View file @
52d6f7d0
# frozen_string_literal: true
class
SecurityReportsMrWidgetPromptExperiment
<
ApplicationExperiment
# rubocop:disable Gitlab/NamespacedClass
def
publish
(
_result
=
nil
)
super
publish_to_database
end
# This is a purely client side experiment, and since we don't have a nicer
# way to define variants yet, we define them here.
def
candidate_behavior
end
end
config/feature_flags/experiment/security_reports_mr_widget_prompt.yml
0 → 100644
View file @
52d6f7d0
---
name
:
security_reports_mr_widget_prompt
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70086
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/340436
milestone
:
'
14.3'
type
:
experiment
group
:
group::adoption
default_enabled
:
false
ee/app/controllers/ee/projects/merge_requests_controller.rb
View file @
52d6f7d0
...
...
@@ -9,6 +9,7 @@ module EE
include
DescriptionDiffActions
before_action
only:
[
:show
]
do
experiment
(
:security_reports_mr_widget_prompt
,
namespace:
@project
.
namespace
).
publish
push_frontend_feature_flag
(
:anonymous_visual_review_feedback
)
push_frontend_feature_flag
(
:missing_mr_security_scan_types
,
@project
)
end
...
...
spec/experiments/security_reports_mr_widget_prompt_experiment_spec.rb
0 → 100644
View file @
52d6f7d0
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
SecurityReportsMrWidgetPromptExperiment
do
it
"defines a control and candidate"
do
expect
(
subject
.
behaviors
.
keys
).
to
match_array
(
%w[control candidate]
)
end
it
"publishes to the database"
do
expect
(
subject
).
to
receive
(
:publish_to_database
)
subject
.
publish
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment