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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1257e1f7
Commit
1257e1f7
authored
Mar 30, 2020
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '210500-missing-merge-conflicts-email-notification' into 'master'"
This reverts merge request !27870
parent
f7ec54f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+0
-8
No files found.
app/models/merge_request.rb
View file @
1257e1f7
...
@@ -189,7 +189,7 @@ class MergeRequest < ApplicationRecord
...
@@ -189,7 +189,7 @@ class MergeRequest < ApplicationRecord
end
end
# rubocop: disable CodeReuse/ServiceClass
# rubocop: disable CodeReuse/ServiceClass
after_transition
[
:unchecked
,
:checking
]
=>
:cannot_be_merged
do
|
merge_request
,
transition
|
after_transition
unchecked:
:cannot_be_merged
do
|
merge_request
,
transition
|
if
merge_request
.
notify_conflict?
if
merge_request
.
notify_conflict?
NotificationService
.
new
.
merge_request_unmergeable
(
merge_request
)
NotificationService
.
new
.
merge_request_unmergeable
(
merge_request
)
TodoService
.
new
.
merge_request_became_unmergeable
(
merge_request
)
TodoService
.
new
.
merge_request_became_unmergeable
(
merge_request
)
...
...
spec/models/merge_request_spec.rb
View file @
1257e1f7
...
@@ -3223,14 +3223,6 @@ describe MergeRequest do
...
@@ -3223,14 +3223,6 @@ describe MergeRequest do
subject
.
mark_as_unmergeable
subject
.
mark_as_unmergeable
end
end
it
'notifies conflict, with enabled async mergability check'
do
expect
(
notification_service
).
to
receive
(
:merge_request_unmergeable
).
with
(
subject
).
once
expect
(
todo_service
).
to
receive
(
:merge_request_became_unmergeable
).
with
(
subject
).
once
subject
.
mark_as_checking
subject
.
mark_as_unmergeable
end
it
'does not notify whenever merge request is newly unmergeable due to other reasons'
do
it
'does not notify whenever merge request is newly unmergeable due to other reasons'
do
allow
(
subject
.
project
.
repository
).
to
receive
(
:can_be_merged?
).
and_return
(
true
)
allow
(
subject
.
project
.
repository
).
to
receive
(
:can_be_merged?
).
and_return
(
true
)
...
...
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