From ff841cf519e80cdf795683bdf192a39d3a1090a3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 12 2014 08:43:26 +0000 Subject: Add a unique message identifier for the email sent about a pull-request --- diff --git a/progit/model.py b/progit/model.py index 9b21902..0b45ccc 100644 --- a/progit/model.py +++ b/progit/model.py @@ -400,6 +400,13 @@ class PullRequest(BASE): self.id, self.repo.name, self.user.user, self.title ) + @property + def mail_id(self): + ''' Return a unique reprensetation of the issue as string that + can be used when sending emails. + ''' + return '%s-pull-request-%s@progit' % (self.repo.name, self.id) + class PullRequestComment(BASE): """ Stores the comments made on a pull-request.