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
Boxiang Sun
gitlab-ce
Commits
273cd9c3
Commit
273cd9c3
authored
Aug 02, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove build_relabeled_recipients
parent
eaa503d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
20 deletions
+7
-20
app/services/notification_recipient_service.rb
app/services/notification_recipient_service.rb
+0
-19
app/services/notification_service.rb
app/services/notification_service.rb
+7
-1
No files found.
app/services/notification_recipient_service.rb
View file @
273cd9c3
...
...
@@ -14,10 +14,6 @@ module NotificationRecipientService
Builder
::
Default
.
new
(
*
a
).
recipient_users
end
def
self
.
build_relabeled_recipients
(
*
a
)
Builder
::
Relabeled
.
new
(
*
a
).
recipient_users
end
def
self
.
build_new_note_recipients
(
*
a
)
Builder
::
NewNote
.
new
(
*
a
).
recipient_users
end
...
...
@@ -246,21 +242,6 @@ module NotificationRecipientService
end
end
class
Relabeled
<
Base
attr_reader
:target
attr_reader
:current_user
attr_reader
:labels
def
initialize
(
target
,
current_user
,
labels
:)
@target
=
target
@current_user
=
current_user
@labels
=
labels
end
def
build!
add_labels_subscribers
(
labels:
labels
)
end
end
class
NewNote
<
Base
attr_reader
:note
def
initialize
(
note
)
...
...
app/services/notification_service.rb
View file @
273cd9c3
...
...
@@ -368,7 +368,13 @@ class NotificationService
end
def
relabeled_resource_email
(
target
,
labels
,
current_user
,
method
)
recipients
=
NotificationRecipientService
.
build_relabeled_recipients
(
target
,
current_user
,
labels:
labels
)
recipients
=
labels
.
flat_map
{
|
l
|
l
.
subscribers
(
target
.
project
)
}
recipients
=
NotificationRecipientService
.
notifiable_users
(
recipients
,
:subscription
,
target:
target
,
acting_user:
current_user
,
)
label_names
=
labels
.
map
(
&
:name
)
recipients
.
each
do
|
recipient
|
...
...
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