mail(:to => recipient.email, :subject => "gitlab | note for issue #{@issue.id} | #{@note.project_name} ")
end
- def new_merge_request_email(merge_request)
- @merge_request = MergeRequest.find(merge_request['id'])
- @user = @merge_request.assignee
- @project = @merge_request.project
- mail(:to => @user.email, :subject => "gitlab | new merge request | #{@merge_request.title} ")
+ def new_merge_request_email(merge_request_id)
+ @merge_request = MergeRequest.find(merge_request_id)
+ mail(:to => @merge_request.assignee_email, :subject => "gitlab | new merge request | #{@merge_request.title} ")
end
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
%td{:align => "left", :style => "padding: 20px 0 0;"}
%h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
New Merge Request
- = link_to truncate(@merge_request.title, :length => 16), project_merge_request_url(@project, @merge_request)
+ = link_to truncate(@merge_request.title, :length => 16), project_merge_request_url(@merge_request.project, @merge_request)
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
%tr
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
%td{:style => "padding: 15px 0 15px;", :valign => "top"}
%p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
-
%p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
- Asignee: #{@merge_request.author.name} → #{@merge_request.assignee.name}
-
+ Asignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
%td
let(:merge_request) { Factory.create(:merge_request, :assignee => assignee, :project => project) }
describe 'that are new' do
- subject { Notify.new_merge_request_email(merge_request) }
+ subject { Notify.new_merge_request_email(merge_request.id) }
it_behaves_like 'an assignee email'