From 643da61c80be011e5bfd934b4eda114826346ccf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 05 2015 10:19:28 +0000 Subject: Notify assignee when there is one --- diff --git a/progit/notify.py b/progit/notify.py index e43d295..9d44947 100644 --- a/progit/notify.py +++ b/progit/notify.py @@ -81,6 +81,8 @@ New comment: ) mail_to = set([cmt.user.emails[0].email for cmt in comment.issue.comments]) mail_to.add(comment.issue.project.user.emails[0].email) + if issue.assignee: + mail_to.add(comment.issue.assignee.emails[0].email) send_email( text, 'Update to issue `%s`' % comment.issue.title, @@ -115,6 +117,8 @@ New issue: ) mail_to = set([cmt.user.emails[0].email for cmt in issue.comments]) mail_to.add(issue.project.user.emails[0].email) + if issue.assignee: + mail_to.add(issue.assignee.emails[0].email) for prouser in issue.project.users: if prouser.user.emails: mail_to.add(prouser.user.emails[0].email)