BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0bb31e54
Commit
0bb31e54
authored
Apr 21, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make handler metric params more explicit
parent
c76812c7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
base_handler.rb
lib/gitlab/email/handler/base_handler.rb
+4
-0
create_issue_handler.rb
lib/gitlab/email/handler/create_issue_handler.rb
+4
-1
create_note_handler.rb
lib/gitlab/email/handler/create_note_handler.rb
+4
-0
unsubscribe_handler.rb
lib/gitlab/email/handler/unsubscribe_handler.rb
+4
-0
receiver.rb
lib/gitlab/email/receiver.rb
+1
-4
No files found.
lib/gitlab/email/handler/base_handler.rb
View file @
0bb31e54
...
...
@@ -16,6 +16,10 @@ module Gitlab
def
execute
raise
NotImplementedError
end
def
metrics_params
{
handler:
self
.
class
.
name
}
end
end
end
end
...
...
lib/gitlab/email/handler/create_issue_handler.rb
View file @
0bb31e54
require
'gitlab/email/handler/base_handler'
module
Gitlab
...
...
@@ -37,6 +36,10 @@ module Gitlab
@project
||=
Project
.
find_by_full_path
(
project_path
)
end
def
metrics_params
super
.
merge
(
project:
project
)
end
private
def
create_issue
...
...
lib/gitlab/email/handler/create_note_handler.rb
View file @
0bb31e54
...
...
@@ -28,6 +28,10 @@ module Gitlab
record_name:
'comment'
)
end
def
metrics_params
super
.
merge
(
project:
project
)
end
private
def
author
...
...
lib/gitlab/email/handler/unsubscribe_handler.rb
View file @
0bb31e54
...
...
@@ -19,6 +19,10 @@ module Gitlab
noteable
.
unsubscribe
(
sent_notification
.
recipient
)
end
def
metrics_params
super
.
merge
(
project:
project
)
end
private
def
sent_notification
...
...
lib/gitlab/email/receiver.rb
View file @
0bb31e54
require_dependency
'gitlab/email/handler'
# Inspired in great part by Discourse's Email::Receiver
...
...
@@ -32,9 +31,7 @@ module Gitlab
raise
UnknownIncomingEmail
unless
handler
Gitlab
::
Metrics
.
add_event
(
:receive_email
,
project:
handler
.
try
(
:project
),
handler:
handler
.
class
.
name
)
Gitlab
::
Metrics
.
add_event
(
:receive_email
,
handler
.
metrics_params
)
handler
.
execute
end
...
...
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