Bitbucket post-receive hook
Review Request #5653 — Created March 22, 2014 and submitted — Latest diff uploaded
This is a Bitbucket post-receive hook that will automatically close review requests as "submitted" after a push. To determine which review requests should be closed, it scans through each commit's commit message for the following strings (case-insensitive): "Reviewed at <reviewboard_url>/r/<id>" or "Review request #<id>". The regex used for this can be overriden in settings_local.py.
Basic testing on a git repo performed. Test passed successfully (see screenshot).
All tests carried out on both mercurial and git repos.
Tests:
1) Close an open review request. [PASSED]
2) Try to close a review request that already has been closed as submitted. (Logged a warning saying that the review request has already been submitted). [PASSED]
3) Try to close a discarded review request. (Marked the review request as submitted) [PASSED]
4) Push without a review request id in commit message. (Error logged that the request id does not exist). [PASSED]
5) Push with a non existent request id in the commit message. (Error logged as Review request id does not exist.) [PASSED]