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
Jérome Perrin
gitlab-ce
Commits
dea02363
Commit
dea02363
authored
Dec 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/project_in_mr_emails' of /home/git/repositories/gitlab/gitlabhq
parents
80c4657f
0429740a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
app/mailers/emails/merge_requests.rb
app/mailers/emails/merge_requests.rb
+4
-0
No files found.
app/mailers/emails/merge_requests.rb
View file @
dea02363
...
...
@@ -2,23 +2,27 @@ module Emails
module
MergeRequests
def
new_merge_request_email
(
recipient_id
,
merge_request_id
)
@merge_request
=
MergeRequest
.
find
(
merge_request_id
)
@project
=
@merge_request
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"New merge request #
#{
@merge_request
.
iid
}
"
,
@merge_request
.
title
))
end
def
reassigned_merge_request_email
(
recipient_id
,
merge_request_id
,
previous_assignee_id
)
@merge_request
=
MergeRequest
.
find
(
merge_request_id
)
@previous_assignee
=
User
.
find_by_id
(
previous_assignee_id
)
if
previous_assignee_id
@project
=
@merge_request
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"Changed merge request #
#{
@merge_request
.
iid
}
"
,
@merge_request
.
title
))
end
def
closed_merge_request_email
(
recipient_id
,
merge_request_id
,
updated_by_user_id
)
@merge_request
=
MergeRequest
.
find
(
merge_request_id
)
@updated_by
=
User
.
find
updated_by_user_id
@project
=
@merge_request
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"Closed merge request #
#{
@merge_request
.
iid
}
"
,
@merge_request
.
title
))
end
def
merged_merge_request_email
(
recipient_id
,
merge_request_id
)
@merge_request
=
MergeRequest
.
find
(
merge_request_id
)
@project
=
@merge_request
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"Accepted merge request #
#{
@merge_request
.
iid
}
"
,
@merge_request
.
title
))
end
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