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
f691eece
Commit
f691eece
authored
Oct 12, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds reviewers to merge conflicts sidebar
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/342494
parent
10329c86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
4 deletions
+29
-4
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue
...ipts/merge_conflicts/components/inline_conflict_lines.vue
+5
-1
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue
...ts/merge_conflicts/components/parallel_conflict_lines.vue
+5
-1
app/views/projects/merge_requests/conflicts/show.html.haml
app/views/projects/merge_requests/conflicts/show.html.haml
+1
-1
spec/features/merge_request/user_resolves_conflicts_spec.rb
spec/features/merge_request/user_resolves_conflicts_spec.rb
+18
-1
No files found.
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue
View file @
f691eece
...
...
@@ -35,7 +35,11 @@ export default {
<td
:class=
"lineCssClass(line)"
class=
"diff-line-num header"
></td>
<td
:class=
"lineCssClass(line)"
class=
"line_content header"
>
<strong>
{{
line
.
richText
}}
</strong>
<button
type=
"button"
@
click=
"handleSelected(
{ file, line })">
<button
type=
"button"
class=
"gl-border-1 gl-border-solid"
@
click=
"handleSelected(
{ file, line })"
>
{{
line
.
buttonTitle
}}
</button>
</td>
...
...
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue
View file @
f691eece
...
...
@@ -35,7 +35,11 @@ export default {
<td
class=
"diff-line-num header"
:class=
"lineCssClass(line)"
></td>
<td
class=
"line_content header"
:class=
"lineCssClass(line)"
>
<strong>
{{
line
.
richText
}}
</strong>
<button
type=
"button"
@
click=
"handleSelected(
{ file, line })">
<button
type=
"button"
class=
"gl-border-1 gl-border-solid"
@
click=
"handleSelected(
{ file, line })"
>
{{
line
.
buttonTitle
}}
</button>
</td>
...
...
app/views/projects/merge_requests/conflicts/show.html.haml
View file @
f691eece
...
...
@@ -6,7 +6,7 @@
.merge-request-details.issuable-details
=
render
"projects/merge_requests/mr_box"
=
render
'shared/issuable/sidebar'
,
issuable_sidebar:
@issuable_sidebar
,
assignees:
@merge_request
.
assignees
,
source_branch:
@merge_request
.
source_branch
=
render
'shared/issuable/sidebar'
,
issuable_sidebar:
@issuable_sidebar
,
assignees:
@merge_request
.
assignees
,
reviewers:
@merge_request
.
reviewers
,
source_branch:
@merge_request
.
source_branch
#conflicts
{
data:
{
conflicts_path:
conflicts_project_merge_request_path
(
@merge_request
.
project
,
@merge_request
,
format: :json
),
resolve_conflicts_path:
resolve_conflicts_project_merge_request_path
(
@merge_request
.
project
,
@merge_request
),
...
...
spec/features/merge_request/user_resolves_conflicts_spec.rb
View file @
f691eece
...
...
@@ -9,7 +9,7 @@ RSpec.describe 'Merge request > User resolves conflicts', :js do
let
(
:user
)
{
project
.
creator
}
def
create_merge_request
(
source_branch
)
create
(
:merge_request
,
source_branch:
source_branch
,
target_branch:
'conflict-start'
,
source_project:
project
,
merge_status: :unchecked
)
do
|
mr
|
create
(
:merge_request
,
source_branch:
source_branch
,
target_branch:
'conflict-start'
,
source_project:
project
,
merge_status: :unchecked
,
reviewers:
[
user
]
)
do
|
mr
|
mr
.
mark_as_unmergeable
end
end
...
...
@@ -178,6 +178,23 @@ RSpec.describe 'Merge request > User resolves conflicts', :js do
end
end
context
'sidebar'
do
let
(
:merge_request
)
{
create_merge_request
(
'conflict-resolvable'
)
}
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
visit
conflicts_project_merge_request_path
(
project
,
merge_request
)
end
it
'displays reviewers'
do
page
.
within
'.issuable-sidebar'
do
expect
(
page
).
to
have_selector
(
'[data-testid="reviewer"]'
,
count:
1
)
end
end
end
unresolvable_conflicts
=
{
'conflict-too-large'
=>
'when the conflicts contain a large file'
,
'conflict-binary-file'
=>
'when the conflicts contain a binary file'
,
...
...
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