ReviewPublishedEmailHook¶
reviewboard.extensions.hooks.ReviewPublishedEmailHook
allows
extensions to modify the recipients of e-mails generated from review publishing
activity.
ReviewPublishedEmailHook
requires one arguments for initialization:
the extension instance.
ReviewPublishedEmailHook
should be sub-classed to provide the
desired behaviour. The default behaviour of the get_to_field()
and
get_cc_field()
methods is to return the field unmodified.
Example¶
from reviewboard.extensions.base import Extension
from reviewboard.extensions.hooks import ReviewPublishedEmailHook
class SampleEmailHook(Review PublishedEmailHook):
def get_to_field(self, to_field, reply, user, review, review_request):
to_field.add(user)
def get_cc_field(self, cc_field, reply, user, review, review_request):
return set([])
class SampleExtension(Extension):
def initialize(self):
SampleEmailHook(self)