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

Set flash message after conflict is resolved

parent 60fff2e85c3b
......@@ -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
})
}
......
......@@ -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
......
......@@ -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]
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