From cdc71ca0d4d19d966a2fb1d953c766786c9d9dcf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 23 2016 10:09:07 +0000 Subject: Do not forget to notify people watching a project of pull-requests Basically, we were just skipping the people watching the project globally from the notifications about pull-requests, entirely... Fixes https://pagure.io/pagure/issue/1682 --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 27cc216..384fc90 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -133,6 +133,9 @@ def _get_emails_for_obj(obj): if obj.isa == 'issue' and not obj.private: for watcher in obj.project.watchers: emails.add(watcher.user.default_email) + elif obj.isa == 'pull-request': + for watcher in obj.project.watchers: + emails.add(watcher.user.default_email) # Add public notifications to lists/users set project-wide if obj.isa == 'issue' and not obj.private: