@@ -477,12 +477,16 @@ class SettingsController(BaseController)
c.my_pull_requests = PullRequest.query()\
.filter(PullRequest.user_id ==
self.rhodecode_user.user_id)\
.order_by(PullRequest.created_on.desc())\
.all()
c.participate_in_pull_requests = \
c.participate_in_pull_requests = sorted(
[x.pull_request for x in PullRequestReviewers.query()\
.filter(PullRequestReviewers.user_id ==
.all()]
.all()],
key=lambda o: o.created_on, reverse=True)
return render('admin/users/user_edit_my_account_pullrequests.html')
@NotAnonymous()
@@ -55,7 +55,7 @@ class PullRequestModel(BaseModel):
repo = self._get_repo(repo)
return PullRequest.query()\
.filter(PullRequest.other_repo == repo)\
.order_by(PullRequest.created_on)\
def create(self, created_by, org_repo, org_ref, other_repo, other_ref,
@@ -78,7 +78,7 @@ class PullRequestModel(BaseModel):
self.sa.add(new)
Session().flush()
#members
for member in reviewers:
for member in set(reviewers):
_usr = self._get_user(member)
reviewer = PullRequestReviewers(_usr, new)
self.sa.add(reviewer)
@@ -116,6 +116,7 @@ class PullRequestModel(BaseModel):
'pr_url': pr_url,
'pr_revisions': revisions
}
notif.create(created_by=created_by_user, subject=subject, body=body,
recipients=reviewers,
type_=Notification.TYPE_PULL_REQUEST, email_kwargs=kwargs)
@@ -6,6 +6,10 @@
<li>
<div style="height: 12px">
<div style="float:left">
%if pull_request.is_closed():
<img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/>
%endif
<img src="${h.url('/images/icons/flag_status_%s.png' % str(pull_request.last_review_status))}" />
<a href="${h.url('pullrequest_show',repo_name=pull_request.other_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.fmt_date(pull_request.created_on))}
</a>
@@ -29,6 +33,10 @@
%for pull_request in c.participate_in_pull_requests:
${_('Pull request #%s opened by %s on %s') % (pull_request.pull_request_id, pull_request.author.full_name, h.fmt_date(pull_request.created_on))}
Status change: