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
4a0801b9
Commit
4a0801b9
authored
Jan 02, 2019
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix already initialized constant constant warning
parent
496c6165
Changes
4
Show 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
+0
-2
lib/gitlab/email/handler/base_handler.rb
lib/gitlab/email/handler/base_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
No files found.
lib/gitlab/email/handler.rb
View file @
4a0801b9
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
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/base_handler.rb
View file @
4a0801b9
...
@@ -6,6 +6,8 @@ module Gitlab
...
@@ -6,6 +6,8 @@ module Gitlab
class
BaseHandler
class
BaseHandler
attr_reader
:mail
,
:mail_key
attr_reader
:mail
,
:mail_key
HANDLER_ACTION_BASE_REGEX
||=
/(?<project_slug>.+)-(?<project_id>\d+)/
.
freeze
def
initialize
(
mail
,
mail_key
)
def
initialize
(
mail
,
mail_key
)
@mail
=
mail
@mail
=
mail
@mail_key
=
mail_key
@mail_key
=
mail_key
...
...
lib/gitlab/email/handler/create_issue_handler.rb
View file @
4a0801b9
...
@@ -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
#{
Gitlab
::
Email
::
Handler
::
HANDLER_ACTION_BASE_REGEX
}
-issue\z/
.
freeze
HANDLER_REGEX
=
/\A
#{
HANDLER_ACTION_BASE_REGEX
}
-(?<incoming_email_token>.+)
-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 @
4a0801b9
...
@@ -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
#{
Gitlab
::
Email
::
Handler
::
HANDLER_ACTION_BASE_REGEX
}
-merge-request\z/
.
freeze
HANDLER_REGEX
=
/\A
#{
HANDLER_ACTION_BASE_REGEX
}
-(?<incoming_email_token>.+)
-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
)
...
...
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