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
Léo-Paul Géneau
gitlab-ce
Commits
734e2105
Commit
734e2105
authored
Jul 20, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move build_custom_key to Default
parent
b010a556
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
app/services/notification_recipient_service.rb
app/services/notification_recipient_service.rb
+6
-8
No files found.
app/services/notification_recipient_service.rb
View file @
734e2105
...
...
@@ -219,12 +219,6 @@ class NotificationRecipientService
recipients
end
# Build event key to search on custom notification level
# Check NotificationSetting::EMAIL_EVENTS
def
build_custom_key
(
action
,
object
)
"
#{
action
}
_
#{
object
.
class
.
model_name
.
name
.
underscore
}
"
.
to_sym
end
end
class
Default
<
Base
...
...
@@ -244,8 +238,6 @@ class NotificationRecipientService
end
def
build
custom_action
=
build_custom_key
(
action
,
target
)
recipients
=
participants
(
current_user
)
recipients
=
add_project_watchers
(
recipients
)
recipients
=
add_custom_notifications
(
recipients
,
custom_action
)
...
...
@@ -278,6 +270,12 @@ class NotificationRecipientService
recipients
.
uniq
end
# Build event key to search on custom notification level
# Check NotificationSetting::EMAIL_EVENTS
def
custom_action
@custom_action
||=
"
#{
action
}
_
#{
target
.
class
.
model_name
.
name
.
underscore
}
"
.
to_sym
end
end
class
Pipeline
<
Base
...
...
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