how to get the username of the reviewer who clicked ship it? I need to 
validate certain condition and send out a mail if the submitter and 
reviewer is same. 

Here is the code:

from __future__ import unicode_literals

from django.conf import settings
from django.conf.urls import patterns, include
from reviewboard.extensions.base import Extension
from reviewboard.extensions.hooks import ReviewRequestApprovalHook
import io
import os
import requests
import time

class SampleApprovalHook(ReviewRequestApprovalHook):
    def is_approved(self, review_request, prev_approved, prev_failure):
        if not prev_approved:
            return prev_approved, prev_failure
        elif (review_request.shipit_count < 3):
                file = open(os.path.join('/tmp',"approvedTest.txt"), "w")
                file.write("SUBMITTED BY:")
                file.write("REVIEWED BY:")
        return True;

class TestHook(Extension):
    metadata = {
        'Name': 'Test',
        'Summary': 'Describe your extension here.',
    is_configurable = True

    def initialize(self):
        # Your extension initialization is done here.

Supercharge your Review Board with Power Pack:
Want us to host Review Board for you? Check out RBCommons:
Happy user? Let us know!
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to