Changeset - c1cac08d7062
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-07-10 23:40:47
marcin@python-works.com
fix url in notification inbox for opened pull request
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/pull_request.py
Show inline comments
 
@@ -61,49 +61,49 @@ class PullRequestModel(BaseModel):
 
        new.org_repo = org_repo
 
        new.org_ref = org_ref
 
        new.other_repo = other_repo
 
        new.other_ref = other_ref
 
        new.revisions = revisions
 
        new.title = title
 
        new.description = description
 
        new.author = created_by_user
 
        self.sa.add(new)
 
        Session().flush()
 
        #members
 
        for member in reviewers:
 
            _usr = self._get_user(member)
 
            reviewer = PullRequestReviewers(_usr, new)
 
            self.sa.add(reviewer)
 

	
 
        #notification to reviewers
 
        notif = NotificationModel()
 

	
 
        subject = safe_unicode(
 
            h.link_to(
 
              _('%(user)s wants you to review pull request #%(pr_id)s') % \
 
                {'user': created_by_user.username,
 
                 'pr_id': new.pull_request_id},
 
              h.url('pullrequest_show', repo_name=other_repo,
 
              h.url('pullrequest_show', repo_name=other_repo.repo_name,
 
                    pull_request_id=new.pull_request_id,
 
                    qualified=True,
 
              )
 
            )
 
        )
 
        body = description
 
        notif.create(created_by=created_by_user, subject=subject, body=body,
 
                     recipients=reviewers,
 
                     type_=Notification.TYPE_PULL_REQUEST,)
 

	
 
        return new
 

	
 
    def _get_changesets(self, org_repo, org_ref, other_repo, other_ref,
 
                        discovery_data):
 
        """
 
        Returns a list of changesets that are incoming from org_repo@org_ref
 
        to other_repo@other_ref
 

	
 
        :param org_repo:
 
        :type org_repo:
 
        :param org_ref:
 
        :type org_ref:
 
        :param other_repo:
 
        :type other_repo:
0 comments (0 inline, 0 general)