From 13d09ca50353c01baa275e5968022c26e077b4c2 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 30 2015 14:13:21 +0000 Subject: Add the groups to the pool of users to notify upon changes to a project --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 46d4233..19c4a58 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -88,6 +88,14 @@ def _get_emails_for_issue(issue): if user.default_email: emails.add(user.default_email) + # Add people in groups with commits access to the project: + for group in issue.project.groups: + if group.creator.default_email: + emails.add(group.creator.default_email) + for user in group.users: + if user.default_email: + emails.add(user.default_email) + # Add people that commented on the ticket for comment in issue.comments: if comment.user.default_email: