Esempio n. 1
0
    def __init__(self, extension, signals=None):
        """Initialize the EmailHook.

        Args:
            extension (djblets.extension.Extension):
                The extension creating this hook.

            signals (list):
                A list of :py:class:`django.signals.Signal` that, when
                triggered, will cause e-mails to be sent. Valid signals are:

                * ``review_request_published``
                * ``review_request_closed``
                * ``review_published``
                * ``reply_published``
        """
        super(EmailHook, self).__init__(extension)

        self.signals = set(signals or [])

        for signal in self.signals:
            register_email_hook(signal, self)
Esempio n. 2
0
    def __init__(self, extension, signals=None):
        """Initialize the EmailHook.

        Args:
            extension (reviewboard.extensions.base.Extension):
                The extension creating this hook.

            signals (list):
                A list of :py:class:`Signals <django.dispatch.Signal>` that,
                when triggered, will cause e-mails to be sent. Valid signals
                are:

                * :py:data:`~reviewboard.reviews.signals.review_request_published`
                * :py:data:`~reviewboard.reviews.signals.review_request_closed`
                * :py:data:`~reviewboard.reviews.signals.review_published`
                * :py:data:`~reviewboard.reviews.signals.reply_published`
        """
        super(EmailHook, self).__init__(extension)

        self.signals = set(signals or [])

        for signal in self.signals:
            register_email_hook(signal, self)
Esempio n. 3
0
    def __init__(self, extension, signals=None):
        """Initialize the EmailHook.

        Args:
            extension (reviewboard.extensions.base.Extension):
                The extension creating this hook.

            signals (list):
                A list of :py:class:`Signals <django.dispatch.Signal>` that,
                when triggered, will cause e-mails to be sent. Valid signals
                are:

                * :py:data:`~reviewboard.reviews.signals.review_request_published`
                * :py:data:`~reviewboard.reviews.signals.review_request_closed`
                * :py:data:`~reviewboard.reviews.signals.review_published`
                * :py:data:`~reviewboard.reviews.signals.reply_published`
        """
        super(EmailHook, self).__init__(extension)

        self.signals = set(signals or [])

        for signal in self.signals:
            register_email_hook(signal, self)