def __init__(self, extension):
        """Initialize and connect all the signals"""
        self.extension = extension

        # Connect the handlers.
        review_published.connect(self._review_published,
                                 dispatch_uid='shipit_ascii_art_extension')
Example #2
0
def connect_signals():
    review_request_closed.connect(review_request_closed_cb, sender=ReviewRequest)
    review_request_published.connect(review_request_published_cb, sender=ReviewRequest)
    review_request_reopened.connect(review_request_reopened_cb, sender=ReviewRequest)

    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
Example #3
0
def connect_signals():
    """Connect e-mail callbacks to signals."""
    review_request_published.connect(review_request_published_cb, sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb, sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
Example #4
0
def connect_signals():
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
Example #5
0
    def __init__(self, extension):
        """Initialize and connect all the signals"""
        self.extension = extension

        # Connect the handlers.
        review_request_published.connect(self._review_request_published)
        review_published.connect(self._review_published)
        reply_published.connect(self._reply_published)
Example #6
0
def connect_signals():
    """
    Hooks up all the event handlers to our callbacks above.
    """
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)

    hipchat.config.init_cfg('/home/ubuntu/reviewboard/hipchat.cfg')
 def register_signals(self):
         review_request_published.connect(self.review_request_published_cb,
                                          sender=ReviewRequest, dispatch_uid="rbxmppnotification")
         review_published.connect(self.review_published_cb, sender=Review, dispatch_uid="rbxmppnotification")
         reply_published.connect(self.reply_published_cb, sender=Review, dispatch_uid="rbxmppnotification")
         review_request_closed.connect(self.review_request_closed_cb,
                                       sender=ReviewRequest, dispatch_uid="rbxmppnotification")
         review_request_reopened.connect(self.review_request_reopened_cb,
                                       sender=ReviewRequest, dispatch_uid="rbxmppnotification")
         user_registered.connect(self.user_registered_cb, dispatch_uid="rbxmppnotification")
Example #8
0
def connect_signals():
    """Connect e-mail callbacks to signals."""
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    review_request_closed.connect(review_request_closed_cb,
                                  sender=ReviewRequest)
    user_registered.connect(user_registered_cb)
    post_save.connect(webapi_token_saved_cb, sender=WebAPIToken)
    post_delete.connect(webapi_token_deleted_cb, sender=WebAPIToken)
Example #9
0
 def register_signals(self):
     review_request_published.connect(self.review_request_published_cb,
                                      sender=ReviewRequest,
                                      dispatch_uid="rbxmppnotification")
     review_published.connect(self.review_published_cb,
                              sender=Review,
                              dispatch_uid="rbxmppnotification")
     reply_published.connect(self.reply_published_cb,
                             sender=Review,
                             dispatch_uid="rbxmppnotification")
     review_request_closed.connect(self.review_request_closed_cb,
                                   sender=ReviewRequest,
                                   dispatch_uid="rbxmppnotification")
     review_request_reopened.connect(self.review_request_reopened_cb,
                                     sender=ReviewRequest,
                                     dispatch_uid="rbxmppnotification")
     user_registered.connect(self.user_registered_cb,
                             dispatch_uid="rbxmppnotification")
Example #10
0
            "base-scripts-post",
            "rbstopwatch/activity_monitor.html",
            ["view_diff", "view_diff_revision", "view_screenshot"],
        )

        self.mousewheel_lib = TemplateHook(
            self,
            "base-scripts",
            "rbstopwatch/mousewheel_lib.html",
            ["view_diff", "view_diff_revision", "view_screenshot"],
        )

        self.review_display = TemplateHook(self, "review-summary-header-post", "rbstopwatch/review_summary_insert.html")

        self.stats_hook = RBStopwatchStatsTableEntry(self)


def on_review_published(sender, **kwargs):
    # Let's see if we can find the right ReviewingSession for this
    # user and review
    user = kwargs.get("user")
    review = kwargs.get("review")
    review_request = review.review_request
    review_session = ReviewingSession.objects.get(user=user, review_request=review_request, review=None)

    review_session.review = review
    review_session.save()


review_published.connect(on_review_published)
Example #11
0
def connect_signals():
    review_request_published.connect(review_request_published_cb,
                                     sender=ReviewRequest)
    review_published.connect(review_published_cb, sender=Review)
    reply_published.connect(reply_published_cb, sender=Review)
    user_registered.connect(user_registered_cb)
Example #12
0
def connect_signals():
    review_request_published.connect(review_request_published_cb)
    review_published.connect(review_published_cb)
    reply_published.connect(reply_published_cb)