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
09c38e46
Commit
09c38e46
authored
Jun 15, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only pass item name
parent
94178149
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
lib/gitlab/email/handler/base_handler.rb
lib/gitlab/email/handler/base_handler.rb
+4
-1
lib/gitlab/email/handler/create_issue_handler.rb
lib/gitlab/email/handler/create_issue_handler.rb
+1
-5
lib/gitlab/email/handler/create_note_handler.rb
lib/gitlab/email/handler/create_note_handler.rb
+1
-5
No files found.
lib/gitlab/email/handler/base_handler.rb
View file @
09c38e46
...
...
@@ -42,9 +42,12 @@ module Gitlab
end
.
join
end
def
verify_record!
(
record
,
exception
,
error_titl
e
)
def
verify_record!
(
record
,
exception
,
nam
e
)
return
if
record
.
persisted?
error_title
=
"The
#{
name
}
could not be created for the following reasons:"
msg
=
error_title
+
record
.
errors
.
full_messages
.
map
do
|
error
|
"
\n\n
-
#{
error
}
"
end
.
join
...
...
lib/gitlab/email/handler/create_issue_handler.rb
View file @
09c38e46
...
...
@@ -22,11 +22,7 @@ module Gitlab
validate_permission!
(
:create_issue
)
verify_record!
(
create_issue
,
InvalidIssueError
,
"The issue could not be created for the following reasons:"
)
verify_record!
(
create_issue
,
InvalidIssueError
,
'issue'
)
end
def
author
...
...
lib/gitlab/email/handler/create_note_handler.rb
View file @
09c38e46
...
...
@@ -19,11 +19,7 @@ module Gitlab
raise
NoteableNotFoundError
unless
sent_notification
.
noteable
raise
EmptyEmailError
if
message
.
blank?
verify_record!
(
create_note
,
InvalidNoteError
,
"The comment could not be created for the following reasons:"
)
verify_record!
(
create_note
,
InvalidNoteError
,
'comment'
)
end
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