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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
f322c302
Commit
f322c302
authored
Aug 04, 2016
by
Sean McGivern
Committed by
Fatih Acet
Aug 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set flash message after conflict is resolved
parent
46f8e642
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
app/assets/javascripts/merge_conflict_resolver.js.es6
app/assets/javascripts/merge_conflict_resolver.js.es6
+2
-2
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+4
-1
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+6
-0
No files found.
app/assets/javascripts/merge_conflict_resolver.js.es6
View file @
f322c302
...
...
@@ -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 @
f322c302
...
...
@@ -151,7 +151,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
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 @
f322c302
...
...
@@ -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