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
a872e4fc
Commit
a872e4fc
authored
Jan 29, 2021
by
Jacques Erasmus
Committed by
Phil Hughes
Jan 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve merge failed error
Improved merge failed error handling
parent
6100ba7f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
13 deletions
+29
-13
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue
...st_widget/components/states/mr_widget_failed_to_merge.vue
+10
-2
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+1
-1
changelogs/unreleased/30141-improve-merge-failed-error-fe.yml
...gelogs/unreleased/30141-improve-merge-failed-error-fe.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+6
-3
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
.../merge_request/user_merges_when_pipeline_succeeds_spec.rb
+3
-3
spec/features/merge_request/user_sees_merge_widget_spec.rb
spec/features/merge_request/user_sees_merge_widget_spec.rb
+2
-2
spec/frontend/vue_mr_widget/components/states/mr_widget_failed_to_merge_spec.js
...idget/components/states/mr_widget_failed_to_merge_spec.js
+2
-2
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue
View file @
a872e4fc
<
script
>
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
n__
}
from
'
~/locale
'
;
import
{
sprintf
,
s__
,
n__
}
from
'
~/locale
'
;
import
{
stripHtml
}
from
'
~/lib/utils/text_utility
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
eventHub
from
'
../../event_hub
'
;
...
...
@@ -31,7 +31,15 @@ export default {
computed
:
{
mergeError
()
{
return
this
.
mr
.
mergeError
?
stripHtml
(
this
.
mr
.
mergeError
,
'
'
).
trim
()
:
''
;
const
mergeError
=
this
.
mr
.
mergeError
?
stripHtml
(
this
.
mr
.
mergeError
,
'
'
).
trim
()
:
''
;
return
sprintf
(
s__
(
'
mrWidget|%{mergeError}.
'
),
{
mergeError
,
},
false
,
);
},
timerText
()
{
return
n__
(
...
...
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
a872e4fc
...
...
@@ -191,7 +191,7 @@ export default {
}
return
sprintf
(
s__
(
'
mrWidget|
Merge failed: %{mergeError}. Please t
ry again.
'
),
s__
(
'
mrWidget|
%{mergeError}. T
ry again.
'
),
{
mergeError
,
},
...
...
changelogs/unreleased/30141-improve-merge-failed-error-fe.yml
0 → 100644
View file @
a872e4fc
---
title
:
Improve merge failed error
merge_request
:
52555
author
:
type
:
changed
locale/gitlab.pot
View file @
a872e4fc
...
...
@@ -33990,6 +33990,12 @@ msgstr ""
msgid "mrWidget|%{link_start}Learn more about resolving conflicts%{link_end}"
msgstr ""
msgid "mrWidget|%{mergeError}."
msgstr ""
msgid "mrWidget|%{mergeError}. Try again."
msgstr ""
msgid "mrWidget|%{metricsLinkStart} Memory %{metricsLinkEnd} usage %{emphasisStart} decreased %{emphasisEnd} from %{memoryFrom}MB to %{memoryTo}MB"
msgstr ""
...
...
@@ -34116,9 +34122,6 @@ msgstr ""
msgid "mrWidget|Merge failed."
msgstr ""
msgid "mrWidget|Merge failed: %{mergeError}. Please try again."
msgstr ""
msgid "mrWidget|Merge locally"
msgstr ""
...
...
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
View file @
a872e4fc
...
...
@@ -145,7 +145,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
before
do
merge_request
.
update!
(
merge_user:
merge_request
.
author
,
merge_error:
'Something went wrong
.
'
merge_error:
'Something went wrong'
)
refresh
end
...
...
@@ -155,7 +155,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
wait_for_requests
page
.
within
(
'.mr-section-container'
)
do
expect
(
page
).
to
have_content
(
'
Merge failed: Something went wrong. Please t
ry again.'
)
expect
(
page
).
to
have_content
(
'
Something went wrong. T
ry again.'
)
end
end
end
...
...
@@ -174,7 +174,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
wait_for_requests
page
.
within
(
'.mr-section-container'
)
do
expect
(
page
).
to
have_content
(
'
Merge failed: Something went wrong. Please t
ry again.'
)
expect
(
page
).
to
have_content
(
'
Something went wrong. T
ry again.'
)
end
end
end
...
...
spec/features/merge_request/user_sees_merge_widget_spec.rb
View file @
a872e4fc
...
...
@@ -319,7 +319,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do
wait_for_requests
page
.
within
(
'.mr-section-container'
)
do
expect
(
page
).
to
have_content
(
'
Merge failed: Something went wrong
'
)
expect
(
page
).
to
have_content
(
'
Something went wrong.
'
)
end
end
end
...
...
@@ -340,7 +340,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do
wait_for_requests
page
.
within
(
'.mr-section-container'
)
do
expect
(
page
).
to
have_content
(
'
Merge failed: Something went wrong
'
)
expect
(
page
).
to
have_content
(
'
Something went wrong.
'
)
end
end
end
...
...
spec/frontend/vue_mr_widget/components/states/mr_widget_failed_to_merge_spec.js
View file @
a872e4fc
...
...
@@ -54,7 +54,7 @@ describe('MRWidgetFailedToMerge', () => {
Vue
.
nextTick
()
.
then
(()
=>
{
expect
(
vm
.
mergeError
).
toBe
(
'
contains line breaks
'
);
expect
(
vm
.
mergeError
).
toBe
(
'
contains line breaks
.
'
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
...
...
@@ -120,7 +120,7 @@ describe('MRWidgetFailedToMerge', () => {
it
(
'
renders given error
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.has-error-message
'
).
textContent
.
trim
()).
toEqual
(
'
Merge error happened
'
,
'
Merge error happened
.
'
,
);
});
...
...
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