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
496c6165
Commit
496c6165
authored
Dec 29, 2018
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move constant definition
parent
a4f2de79
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/email/handler.rb
lib/gitlab/email/handler.rb
+2
-0
lib/gitlab/email/handler/create_issue_handler.rb
lib/gitlab/email/handler/create_issue_handler.rb
+1
-1
lib/gitlab/email/handler/create_merge_request_handler.rb
lib/gitlab/email/handler/create_merge_request_handler.rb
+1
-1
lib/gitlab/email/handler/reply_processing.rb
lib/gitlab/email/handler/reply_processing.rb
+0
-2
No files found.
lib/gitlab/email/handler.rb
View file @
496c6165
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
module
Gitlab
module
Gitlab
module
Email
module
Email
module
Handler
module
Handler
HANDLER_ACTION_BASE_REGEX
=
/(?<project_slug>.+)-(?<project_id>\d+)-(?<incoming_email_token>.+)/
.
freeze
def
self
.
handlers
def
self
.
handlers
@handlers
||=
load_handlers
@handlers
||=
load_handlers
end
end
...
...
lib/gitlab/email/handler/create_issue_handler.rb
View file @
496c6165
...
@@ -11,7 +11,7 @@ module Gitlab
...
@@ -11,7 +11,7 @@ module Gitlab
class
CreateIssueHandler
<
BaseHandler
class
CreateIssueHandler
<
BaseHandler
include
ReplyProcessing
include
ReplyProcessing
HANDLER_REGEX
=
/\A
#{
HANDLER_ACTION_BASE_REGEX
}
-issue\z/
.
freeze
HANDLER_REGEX
=
/\A
#{
Gitlab
::
Email
::
Handler
::
HANDLER_ACTION_BASE_REGEX
}
-issue\z/
.
freeze
HANDLER_REGEX_LEGACY
=
/\A(?<project_path>[^\+]*)\+(?<incoming_email_token>.*)\z/
.
freeze
HANDLER_REGEX_LEGACY
=
/\A(?<project_path>[^\+]*)\+(?<incoming_email_token>.*)\z/
.
freeze
def
initialize
(
mail
,
mail_key
)
def
initialize
(
mail
,
mail_key
)
...
...
lib/gitlab/email/handler/create_merge_request_handler.rb
View file @
496c6165
...
@@ -12,7 +12,7 @@ module Gitlab
...
@@ -12,7 +12,7 @@ module Gitlab
class
CreateMergeRequestHandler
<
BaseHandler
class
CreateMergeRequestHandler
<
BaseHandler
include
ReplyProcessing
include
ReplyProcessing
HANDLER_REGEX
=
/\A
#{
HANDLER_ACTION_BASE_REGEX
}
-merge-request\z/
.
freeze
HANDLER_REGEX
=
/\A
#{
Gitlab
::
Email
::
Handler
::
HANDLER_ACTION_BASE_REGEX
}
-merge-request\z/
.
freeze
HANDLER_REGEX_LEGACY
=
/\A(?<project_path>[^\+]*)\+merge-request\+(?<incoming_email_token>.*)/
.
freeze
HANDLER_REGEX_LEGACY
=
/\A(?<project_path>[^\+]*)\+merge-request\+(?<incoming_email_token>.*)/
.
freeze
def
initialize
(
mail
,
mail_key
)
def
initialize
(
mail
,
mail_key
)
...
...
lib/gitlab/email/handler/reply_processing.rb
View file @
496c6165
...
@@ -6,8 +6,6 @@ module Gitlab
...
@@ -6,8 +6,6 @@ module Gitlab
module
ReplyProcessing
module
ReplyProcessing
private
private
HANDLER_ACTION_BASE_REGEX
=
/(?<project_slug>.+)-(?<project_id>\d+)-(?<incoming_email_token>.+)/
.
freeze
attr_reader
:project_id
,
:project_slug
,
:project_path
,
:incoming_email_token
attr_reader
:project_id
,
:project_slug
,
:project_path
,
:incoming_email_token
def
author
def
author
...
...
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