Commit f322c302 authored by Sean McGivern's avatar Sean McGivern Committed by Fatih Acet

Set flash message after conflict is resolved

parent 46f8e642
...@@ -59,8 +59,8 @@ window.MergeConflictResolver = class MergeConflictResolver { ...@@ -59,8 +59,8 @@ window.MergeConflictResolver = class MergeConflictResolver {
commit() { commit() {
$.post('./resolve_conflicts', this.dataProvider.getCommitData()) $.post('./resolve_conflicts', this.dataProvider.getCommitData())
.always( (data) => { .then( (data) => {
console.log(data) window.location.href = data.redirect_to
}) })
} }
......
...@@ -151,7 +151,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -151,7 +151,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
begin begin
MergeRequests::ResolveService.new(project, current_user, params).execute(@merge_request) 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 rescue Gitlab::Conflict::File::MissingResolution => e
render status: :bad_request, json: { message: e.message } render status: :bad_request, json: { message: e.message }
end end
......
...@@ -42,3 +42,9 @@ ...@@ -42,3 +42,9 @@
.ci_widget.ci-error{style: "display:none"} .ci_widget.ci-error{style: "display:none"}
= icon("times-circle") = icon("times-circle")
Could not connect to the CI server. Please check your settings and try again. 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]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment