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
621c6b85
Commit
621c6b85
authored
Jan 02, 2013
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix commit note notification
parent
7335f366
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
notify.rb
app/mailers/notify.rb
+2
-2
note_observer.rb
app/observers/note_observer.rb
+1
-1
No files found.
app/mailers/notify.rb
View file @
621c6b85
...
@@ -62,12 +62,12 @@ class Notify < ActionMailer::Base
...
@@ -62,12 +62,12 @@ class Notify < ActionMailer::Base
# Note
# Note
#
#
def
note_commit_email
(
recipient_id
,
note_id
)
def
note_commit_email
(
commit_autor_email
,
note_id
)
@note
=
Note
.
find
(
note_id
)
@note
=
Note
.
find
(
note_id
)
@commit
=
@note
.
noteable
@commit
=
@note
.
noteable
@commit
=
CommitDecorator
.
decorate
(
@commit
)
@commit
=
CommitDecorator
.
decorate
(
@commit
)
@project
=
@note
.
project
@project
=
@note
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"note for commit
#{
@commit
.
short_id
}
"
,
@commit
.
title
))
mail
(
to:
recipient
(
commit_autor_email
),
subject:
subject
(
"note for commit
#{
@commit
.
short_id
}
"
,
@commit
.
title
))
end
end
def
note_issue_email
(
recipient_id
,
note_id
)
def
note_issue_email
(
recipient_id
,
note_id
)
...
...
app/observers/note_observer.rb
View file @
621c6b85
...
@@ -11,7 +11,7 @@ class NoteObserver < ActiveRecord::Observer
...
@@ -11,7 +11,7 @@ class NoteObserver < ActiveRecord::Observer
notify_team
(
note
)
notify_team
(
note
)
elsif
note
.
notify_author
elsif
note
.
notify_author
# Notify only author of resource
# Notify only author of resource
Notify
.
note_commit_email
(
note
.
commit_author
.
id
,
note
.
id
).
deliver
Notify
.
note_commit_email
(
note
.
noteable
.
author_email
,
note
.
id
).
deliver
else
else
# Otherwise ignore it
# Otherwise ignore it
nil
nil
...
...
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