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
a25b9fb3
Commit
a25b9fb3
authored
Jun 04, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EE port of mr-widget-merge-error
parent
fb383dc6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
13 deletions
+28
-13
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_alert_message.vue
...rge_request_widget/components/mr_widget_alert_message.vue
+1
-1
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue
..._widget/components/states/mr_widget_auto_merge_failed.vue
+1
-3
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
...merge_request_widget/components/states/ready_to_merge.vue
+1
-0
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+10
-1
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+4
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
.../merge_request/user_merges_when_pipeline_succeeds_spec.rb
+4
-4
spec/features/merge_request/user_sees_merge_widget_spec.rb
spec/features/merge_request/user_sees_merge_widget_spec.rb
+4
-4
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_alert_message.vue
View file @
a25b9fb3
...
@@ -37,7 +37,7 @@ export default {
...
@@ -37,7 +37,7 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"m-3 ml-
5
"
:class=
"messageClass"
>
<div
class=
"m-3 ml-
7
"
:class=
"messageClass"
>
<slot></slot>
<slot></slot>
<gl-link
v-if=
"helpPath"
:href=
"helpPath"
target=
"_blank"
>
<gl-link
v-if=
"helpPath"
:href=
"helpPath"
target=
"_blank"
>
<icon
:size=
"16"
name=
"question-o"
class=
"align-middle"
/>
<icon
:size=
"16"
name=
"question-o"
class=
"align-middle"
/>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue
View file @
a25b9fb3
...
@@ -35,9 +35,7 @@ export default {
...
@@ -35,9 +35,7 @@ export default {
<status-icon
status=
"warning"
/>
<status-icon
status=
"warning"
/>
<div
class=
"media-body space-children"
>
<div
class=
"media-body space-children"
>
<span
class=
"bold"
>
<span
class=
"bold"
>
<template
v-if=
"mr.mergeError"
<template
v-if=
"mr.mergeError"
>
{{
mr
.
mergeError
}}
</
template
>
>
{{
mr
.
mergeError
}}
.
</
template
>
{{ s__('mrWidget|This merge request failed to be merged automatically') }}
{{ s__('mrWidget|This merge request failed to be merged automatically') }}
</span>
</span>
<button
<button
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
View file @
a25b9fb3
...
@@ -330,6 +330,7 @@ export default {
...
@@ -330,6 +330,7 @@ export default {
:commits-count=
"mr.commitsCount"
:commits-count=
"mr.commitsCount"
:target-branch=
"mr.targetBranch"
:target-branch=
"mr.targetBranch"
:is-fast-forward-enabled=
"mr.ffOnlyEnabled"
:is-fast-forward-enabled=
"mr.ffOnlyEnabled"
:class=
"
{ 'border-bottom': mr.mergeError }"
>
>
<ul
class=
"border-top content-list commits-list flex-list"
>
<ul
class=
"border-top content-list commits-list flex-list"
>
<commit-edit
<commit-edit
...
...
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
a25b9fb3
<
script
>
<
script
>
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
sprintf
,
s__
,
__
}
from
'
~/locale
'
;
import
Project
from
'
~/pages/projects/project
'
;
import
Project
from
'
~/pages/projects/project
'
;
import
SmartInterval
from
'
~/smart_interval
'
;
import
SmartInterval
from
'
~/smart_interval
'
;
import
MRWidgetStore
from
'
ee_else_ce/vue_merge_request_widget/stores/mr_widget_store
'
;
import
MRWidgetStore
from
'
ee_else_ce/vue_merge_request_widget/stores/mr_widget_store
'
;
...
@@ -125,6 +125,11 @@ export default {
...
@@ -125,6 +125,11 @@ export default {
this
.
mr
.
pipeline
.
target_sha
!==
this
.
mr
.
targetBranchSha
,
this
.
mr
.
pipeline
.
target_sha
!==
this
.
mr
.
targetBranchSha
,
);
);
},
},
mergeError
()
{
return
sprintf
(
s__
(
'
mrWidget|Merge failed: %{mergeError}. Please try again.
'
),
{
mergeError
:
this
.
mr
.
mergeError
,
});
},
},
},
watch
:
{
watch
:
{
state
(
newVal
,
oldVal
)
{
state
(
newVal
,
oldVal
)
{
...
@@ -370,6 +375,10 @@ export default {
...
@@ -370,6 +375,10 @@ export default {
}}
}}
</mr-widget-alert-message>
</mr-widget-alert-message>
<mr-widget-alert-message
v-if=
"mr.mergeError"
type=
"danger"
>
{{
mergeError
}}
</mr-widget-alert-message>
<source-branch-removal-status
v-if=
"shouldRenderSourceBranchRemovalStatus"
/>
<source-branch-removal-status
v-if=
"shouldRenderSourceBranchRemovalStatus"
/>
</div>
</div>
</div>
</div>
...
...
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
a25b9fb3
...
@@ -332,6 +332,10 @@ export default {
...
@@ -332,6 +332,10 @@ export default {
}}
}}
</mr-widget-alert-message>
</mr-widget-alert-message>
<mr-widget-alert-message
v-if=
"mr.mergeError"
type=
"danger"
>
{{
mergeError
}}
</mr-widget-alert-message>
<source-branch-removal-status
v-if=
"shouldRenderSourceBranchRemovalStatus"
/>
<source-branch-removal-status
v-if=
"shouldRenderSourceBranchRemovalStatus"
/>
</div>
</div>
</div>
</div>
...
...
locale/gitlab.pot
View file @
a25b9fb3
...
@@ -15952,6 +15952,9 @@ msgstr ""
...
@@ -15952,6 +15952,9 @@ msgstr ""
msgid "mrWidget|Merge failed."
msgid "mrWidget|Merge failed."
msgstr ""
msgstr ""
msgid "mrWidget|Merge failed: %{mergeError}. Please try again."
msgstr ""
msgid "mrWidget|Merge locally"
msgid "mrWidget|Merge locally"
msgstr ""
msgstr ""
...
...
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
View file @
a25b9fb3
...
@@ -158,8 +158,8 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
...
@@ -158,8 +158,8 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
# Wait for the `ci_status` and `merge_check` requests
# Wait for the `ci_status` and `merge_check` requests
wait_for_requests
wait_for_requests
page
.
within
(
'.mr-
widget-body
'
)
do
page
.
within
(
'.mr-
section-container
'
)
do
expect
(
page
).
to
have_content
(
'Something went wrong'
)
expect
(
page
).
to
have_content
(
'
Merge failed:
Something went wrong'
)
end
end
end
end
end
end
...
@@ -177,8 +177,8 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
...
@@ -177,8 +177,8 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
# Wait for the `ci_status` and `merge_check` requests
# Wait for the `ci_status` and `merge_check` requests
wait_for_requests
wait_for_requests
page
.
within
(
'.mr-
widget-body
'
)
do
page
.
within
(
'.mr-
section-container
'
)
do
expect
(
page
).
to
have_content
(
'Something went wrong'
)
expect
(
page
).
to
have_content
(
'
Merge failed:
Something went wrong'
)
end
end
end
end
end
end
...
...
spec/features/merge_request/user_sees_merge_widget_spec.rb
View file @
a25b9fb3
...
@@ -326,8 +326,8 @@ describe 'Merge request > User sees merge widget', :js do
...
@@ -326,8 +326,8 @@ describe 'Merge request > User sees merge widget', :js do
# Wait for the `ci_status` and `merge_check` requests
# Wait for the `ci_status` and `merge_check` requests
wait_for_requests
wait_for_requests
page
.
within
(
'.mr-
widget-body
'
)
do
page
.
within
(
'.mr-
section-container
'
)
do
expect
(
page
).
to
have_content
(
'Something went wrong'
)
expect
(
page
).
to
have_content
(
'
Merge failed:
Something went wrong'
)
end
end
end
end
end
end
...
@@ -347,8 +347,8 @@ describe 'Merge request > User sees merge widget', :js do
...
@@ -347,8 +347,8 @@ describe 'Merge request > User sees merge widget', :js do
# Wait for the `ci_status` and `merge_check` requests
# Wait for the `ci_status` and `merge_check` requests
wait_for_requests
wait_for_requests
page
.
within
(
'.mr-
widget-body
'
)
do
page
.
within
(
'.mr-
section-container
'
)
do
expect
(
page
).
to
have_content
(
'Something went wrong'
)
expect
(
page
).
to
have_content
(
'
Merge failed:
Something went wrong'
)
end
end
end
end
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