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
db4c3f36
Commit
db4c3f36
authored
Feb 11, 2021
by
Gary Holtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing yaml file to true and adding default_enabled to feature checks
parent
0ca004ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-2
app/services/merge_requests/reload_merge_head_diff_service.rb
...services/merge_requests/reload_merge_head_diff_service.rb
+1
-1
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+1
-1
config/feature_flags/development/default_merge_ref_for_diffs.yml
...feature_flags/development/default_merge_ref_for_diffs.yml
+1
-1
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
db4c3f36
...
...
@@ -36,7 +36,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag
(
:merge_request_widget_graphql
,
@project
)
push_frontend_feature_flag
(
:drag_comment_selection
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:unified_diff_components
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:default_merge_ref_for_diffs
,
@project
)
push_frontend_feature_flag
(
:default_merge_ref_for_diffs
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:core_security_mr_widget_counts
,
@project
)
push_frontend_feature_flag
(
:remove_resolve_note
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:diffs_gradual_load
,
@project
,
default_enabled:
true
)
...
...
@@ -502,7 +502,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
params
=
request
.
query_parameters
params
[
:view
]
=
"inline"
if
Feature
.
enabled?
(
:default_merge_ref_for_diffs
,
project
)
if
Feature
.
enabled?
(
:default_merge_ref_for_diffs
,
project
,
default_enabled: :yaml
)
params
=
params
.
merge
(
diff_head:
true
)
end
...
...
app/services/merge_requests/reload_merge_head_diff_service.rb
View file @
db4c3f36
...
...
@@ -24,7 +24,7 @@ module MergeRequests
attr_reader
:merge_request
def
enabled?
Feature
.
enabled?
(
:default_merge_ref_for_diffs
,
merge_request
.
project
)
Feature
.
enabled?
(
:default_merge_ref_for_diffs
,
merge_request
.
project
,
default_enabled: :yaml
)
end
def
recreate_merge_head_diff
...
...
app/views/projects/merge_requests/show.html.haml
View file @
db4c3f36
...
...
@@ -78,7 +78,7 @@
-
if
mr_action
===
"diffs"
-
add_page_startup_api_call
@endpoint_metadata_url
-
params
=
request
.
query_parameters
-
if
Feature
.
enabled?
(
:default_merge_ref_for_diffs
,
@project
)
-
if
Feature
.
enabled?
(
:default_merge_ref_for_diffs
,
@project
,
default_enabled: :yaml
)
-
params
=
params
.
merge
(
diff_head:
true
)
=
render
"projects/merge_requests/tabs/pane"
,
name:
"diffs"
,
id:
"js-diffs-app"
,
class:
"diffs"
,
data:
{
"is-locked"
:
@merge_request
.
discussion_locked?
,
endpoint:
diffs_project_merge_request_path
(
@project
,
@merge_request
,
'json'
,
params
),
...
...
config/feature_flags/development/default_merge_ref_for_diffs.yml
View file @
db4c3f36
...
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/276917
milestone
:
'
13.4'
type
:
development
group
:
group::code review
default_enabled
:
fals
e
default_enabled
:
tru
e
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