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
68197be5
Commit
68197be5
authored
Jun 26, 2020
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display notes on merge ref head diff
It enables merge_ref_head_comments FF by default
parent
face0349
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
4 deletions
+9
-4
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/serializers/discussion_entity.rb
app/serializers/discussion_entity.rb
+1
-1
app/services/merge_requests/mergeability_check_service.rb
app/services/merge_requests/mergeability_check_service.rb
+1
-1
app/services/notes/create_service.rb
app/services/notes/create_service.rb
+1
-1
changelogs/unreleased/id-merge-ref-comments-ff.yml
changelogs/unreleased/id-merge-ref-comments-ff.yml
+5
-0
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
68197be5
...
@@ -31,7 +31,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
...
@@ -31,7 +31,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag
(
:suggest_pipeline
)
if
experiment_enabled?
(
:suggest_pipeline
)
push_frontend_feature_flag
(
:suggest_pipeline
)
if
experiment_enabled?
(
:suggest_pipeline
)
push_frontend_feature_flag
(
:code_navigation
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:code_navigation
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:widget_visibility_polling
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:widget_visibility_polling
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:merge_ref_head_comments
,
@project
)
push_frontend_feature_flag
(
:merge_ref_head_comments
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:mr_commit_neighbor_nav
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:mr_commit_neighbor_nav
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:multiline_comments
,
@project
)
push_frontend_feature_flag
(
:multiline_comments
,
@project
)
push_frontend_feature_flag
(
:file_identifier_hash
)
push_frontend_feature_flag
(
:file_identifier_hash
)
...
...
app/serializers/discussion_entity.rb
View file @
68197be5
...
@@ -72,6 +72,6 @@ class DiscussionEntity < Grape::Entity
...
@@ -72,6 +72,6 @@ class DiscussionEntity < Grape::Entity
return
unless
discussion
.
diff_discussion?
return
unless
discussion
.
diff_discussion?
return
if
discussion
.
legacy_diff_discussion?
return
if
discussion
.
legacy_diff_discussion?
Feature
.
enabled?
(
:merge_ref_head_comments
,
discussion
.
project
)
Feature
.
enabled?
(
:merge_ref_head_comments
,
discussion
.
project
,
default_enabled:
true
)
end
end
end
end
app/services/merge_requests/mergeability_check_service.rb
View file @
68197be5
...
@@ -125,7 +125,7 @@ module MergeRequests
...
@@ -125,7 +125,7 @@ module MergeRequests
end
end
def
update_diff_discussion_positions!
def
update_diff_discussion_positions!
return
if
Feature
.
disabled?
(
:merge_ref_head_comments
,
merge_request
.
target_project
)
return
if
Feature
.
disabled?
(
:merge_ref_head_comments
,
merge_request
.
target_project
,
default_enabled:
true
)
Discussions
::
CaptureDiffNotePositionsService
.
new
(
merge_request
).
execute
Discussions
::
CaptureDiffNotePositionsService
.
new
(
merge_request
).
execute
end
end
...
...
app/services/notes/create_service.rb
View file @
68197be5
...
@@ -66,7 +66,7 @@ module Notes
...
@@ -66,7 +66,7 @@ module Notes
Gitlab
::
Tracking
.
event
(
'Notes::CreateService'
,
'execute'
,
tracking_data_for
(
note
))
Gitlab
::
Tracking
.
event
(
'Notes::CreateService'
,
'execute'
,
tracking_data_for
(
note
))
end
end
if
Feature
.
enabled?
(
:merge_ref_head_comments
,
project
)
&&
note
.
for_merge_request?
&&
note
.
diff_note?
&&
note
.
start_of_discussion?
if
Feature
.
enabled?
(
:merge_ref_head_comments
,
project
,
default_enabled:
true
)
&&
note
.
for_merge_request?
&&
note
.
diff_note?
&&
note
.
start_of_discussion?
Discussions
::
CaptureDiffNotePositionService
.
new
(
note
.
noteable
,
note
.
diff_file
&
.
paths
).
execute
(
note
.
discussion
)
Discussions
::
CaptureDiffNotePositionService
.
new
(
note
.
noteable
,
note
.
diff_file
&
.
paths
).
execute
(
note
.
discussion
)
end
end
end
end
...
...
changelogs/unreleased/id-merge-ref-comments-ff.yml
0 → 100644
View file @
68197be5
---
title
:
Display notes on merge ref head diff
merge_request
:
35422
author
:
type
:
added
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