Hi! I'am providing hooks in reviewboard and I think how I can do this. My idea is simple Add to json.py import like this:
from rbhooks import pre_review_close_hook, post_review_close_hook And then modify some functions: try: pre_review_close_hook(review_request_id, type, request) review_request = ReviewRequest.objects.get(pk=review_request_id) review_request.close(type_map[type], request.user) post_review_close_hook(review_request, type, request) except ReviewRequest.DoesNotExist: return WebAPIResponseError(request, DOES_NOT_EXIST) except PermissionError: return HttpResponseForbidden() Where should be rbtools? I thinks this should be empty file (later when number of hooks will be large even directory) in ./rbtools.py for development and conf/rbtools.py in rb-site instance file where will be empty functions like this: def pre_review_close_hook(review_request_id, type, request): pass def post_review_close_hook(review_request, type, request): pass I'am providing some hooks now and I want to ask this tool author is there any way in which they want implement this feature. Any suggestions, ideas? One idea is provide triggers which can't modify anything, and if needed hooks which allow modify variables provided to function. -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en To unsubscribe, reply using "remove me" as the subject.