##// END OF EJS Templates
Nicer email notifications about pull-request
marcink -
r2799:493646d3 beta
parent child Browse files
Show More
@@ -0,0 +1,20 b''
1 ## -*- coding: utf-8 -*-
2 <%inherit file="main.html"/>
3
4 User <b>${pr_user_created}</b> opened pull request for repository
5 ${pr_repo_url} and wants you to review changes.
6
7 <div>title: ${pr_title}</div>
8 <div>description:</div>
9 <p>
10 ${body}
11 </p>
12
13 <div>revisions for reviewing</div>
14 <ul>
15 %for r in pr_revisions:
16 <li>${r}</li>
17 %endfor
18 </ul>
19
20 View this pull request here: ${pr_url}
@@ -18,15 +18,17 b' news'
18 18 empty data
19 19 - modified_on column saves repository update and it's going to be used
20 20 later for light version of main page ref #500
21 - pull request notifications send much nicer emails with details about pull
22 request
21 23
22 24 fixes
23 25 +++++
24 26
25 27 - fixed migrations of permissions that can lead to inconsistency.
26 Some users sent feedback that after upgrading from older versions issues with updating
27 default permissions occured. RhodeCode detects that now and resets default user
28 permission to initial state if there is a need for that. Also forces users to set
29 the default value for new forking permission.
28 Some users sent feedback that after upgrading from older versions issues
29 with updating default permissions occurred. RhodeCode detects that now and
30 resets default user permission to initial state if there is a need for that.
31 Also forces users to set the default value for new forking permission.
30 32
31 33
32 34 1.4.0 (**2012-09-03**)
@@ -255,7 +255,8 b' class EmailNotificationModel(BaseModel):'
255 255 self.TYPE_CHANGESET_COMMENT: 'email_templates/changeset_comment.html',
256 256 self.TYPE_PASSWORD_RESET: 'email_templates/password_reset.html',
257 257 self.TYPE_REGISTRATION: 'email_templates/registration.html',
258 self.TYPE_DEFAULT: 'email_templates/default.html'
258 self.TYPE_DEFAULT: 'email_templates/default.html',
259 self.TYPE_PULL_REQUEST: 'email_templates/pull_request.html',
259 260 }
260 261
261 262 def get_email_tmpl(self, type_, **kwargs):
@@ -79,22 +79,30 b' class PullRequestModel(BaseModel):'
79 79 #notification to reviewers
80 80 notif = NotificationModel()
81 81
82 pr_url = h.url('pullrequest_show', repo_name=other_repo.repo_name,
83 pull_request_id=new.pull_request_id,
84 qualified=True,
85 )
82 86 subject = safe_unicode(
83 87 h.link_to(
84 88 _('%(user)s wants you to review pull request #%(pr_id)s') % \
85 89 {'user': created_by_user.username,
86 90 'pr_id': new.pull_request_id},
87 h.url('pullrequest_show', repo_name=other_repo.repo_name,
88 pull_request_id=new.pull_request_id,
89 qualified=True,
90 )
91 pr_url
91 92 )
92 93 )
93 94 body = description
95 kwargs = {
96 'pr_title': title,
97 'pr_user_created': h.person(created_by_user.email),
98 'pr_repo_url': h.url('summary_home', repo_name=other_repo.repo_name,
99 qualified=True,),
100 'pr_url': pr_url,
101 'pr_revisions': revisions
102 }
94 103 notif.create(created_by=created_by_user, subject=subject, body=body,
95 104 recipients=reviewers,
96 type_=Notification.TYPE_PULL_REQUEST,)
97
105 type_=Notification.TYPE_PULL_REQUEST, email_kwargs=kwargs)
98 106 return new
99 107
100 108 def update_reviewers(self, pull_request, reviewers_ids):
General Comments 0
You need to be logged in to leave comments. Login now