Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
fb7779db7e1e
Commit
f322c302
authored
Aug 04, 2016
by
Sean McGivern
Committed by
Fatih Acet
Aug 12, 2016
Browse files
Set flash message after conflict is resolved
parent
60fff2e85c3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/merge_conflict_resolver.js.es6
View file @
fb7779db
...
...
@@ -59,8 +59,8 @@ window.MergeConflictResolver = class MergeConflictResolver {
commit() {
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
.
always
( (data) => {
console.log(data)
.
then
( (data) => {
window.location.href = data.redirect_to
})
}
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
fb7779db
...
...
@@ -151,7 +151,10 @@ def resolve_conflicts
begin
MergeRequests
::
ResolveService
.
new
(
project
,
current_user
,
params
).
execute
(
@merge_request
)
head
:ok
flash
[
:conflicts_message
]
=
'Merge conflicts resolved.'
flash
.
keep
render
json:
{
redirect_to:
namespace_project_merge_request_url
(
@project
.
namespace
,
@project
,
@merge_request
)
}
rescue
Gitlab
::
Conflict
::
File
::
MissingResolution
=>
e
render
status: :bad_request
,
json:
{
message:
e
.
message
}
end
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
fb7779db
...
...
@@ -42,3 +42,9 @@
.ci_widget.ci-error
{
style:
"display:none"
}
=
icon
(
"times-circle"
)
Could not connect to the CI server. Please check your settings and try again.
-
if
flash
[
:conflicts_message
]
.mr-widget-heading
.ci_widget
=
ci_icon_for_status
(
'success'
)
=
flash
[
:conflicts_message
]
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