Commit d0e11f37 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'reduce-notice-count' into 'master'

Remove annoying notice messages when create/update merge request

See merge request !1681
parents bba14223 5f40253f
...@@ -78,10 +78,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -78,10 +78,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request = MergeRequests::CreateService.new(project, current_user, merge_request_params).execute @merge_request = MergeRequests::CreateService.new(project, current_user, merge_request_params).execute
if @merge_request.valid? if @merge_request.valid?
redirect_to( redirect_to(merge_request_path(@merge_request))
merge_request_path(@merge_request),
notice: 'Merge request was successfully created.'
)
else else
@source_project = @merge_request.source_project @source_project = @merge_request.source_project
@target_project = @merge_request.target_project @target_project = @merge_request.target_project
...@@ -97,8 +94,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -97,8 +94,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
format.js format.js
format.html do format.html do
redirect_to([@merge_request.target_project.namespace.becomes(Namespace), redirect_to([@merge_request.target_project.namespace.becomes(Namespace),
@merge_request.target_project, @merge_request], @merge_request.target_project, @merge_request])
notice: 'Merge request was successfully updated.')
end end
format.json do format.json do
render json: { render json: {
......
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