- Description:
-
~ This is a GitHub 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>".
~ This is a Beanstalk 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>".
Things left to do:
1) Add support for SVN 2) Add more tests for both repositories.
Beanstalk post-receive web hook
Review Request #5698 — Created April 10, 2014 and submitted
This is a Beanstalk 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>".
This is what the JSON payload looks like:
http://support.beanstalkapp.com/customer/portal/articles/75753-trigger-a-url-on-commit-with-web-hooks
Test carried out on git and svn repos.
1) Push with the review request id in the commit message. Review request closed. [PASSED]
2) Push without a review request id in the commit message. (Review request closed based on the commit_id for git and error looged for svn) [PASSED].
3) Push with non existent review request id. (Error: Review request does not exist) [PASSED]
4) Push with review id in the message that is already submitted. (logged a warning: request id already submitted.) [PASSED]
5) Push with review id in the message that has been marked as discarded. (review request marked as submitted.) [PASSED]
Description | From | Last Updated |
---|---|---|
Remove this line. |
david | |
Remove this line. |
david | |
We've switched over to using the new exception syntax: try: ... except KeyError as e: ... |
david | |
We've switched over to using the new exception syntax: try: ... except KeyError as e: ... |
david | |
How would you feel about introducing another method that could do this check and fan out to the individual implementations? |
david | |
So the individual implementations close the review requests or they just return the review_id_to_commits map as they do now ? |
B. b.ramnani | |
dict.get() defaults to None if the key doesn't exist, so you don't need to specify this second parameter. |
david | |
Two blank lines between top-level things. |
david | |
Can you try to shorten and/or re-wrap this to keep it under 80 columns? |
david | |
dict.get() defaults to None if the key doesn't exist, so you don't need to specify this second parameter. |
david | |
dict.get() defaults to None if the key doesn't exist, so you don't need to specify this second parameter. |
david | |
Two blank lines between top-level things. |
david | |
Can you try to shorten and/or re-wrap this to keep it under 80 columns? |
david | |
dict.get() defaults to None if the key doesn't exist, so you don't need to specify this second parameter. |
david |
- Description:
-
This is a Beanstalk 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>".
~ Things left to do:
~ 1) Add support for SVN ~ This is what the JSON payload looks like:
~ http://support.beanstalkapp.com/customer/portal/articles/75753-trigger-a-url-on-commit-with-web-hooks - 2) Add more tests for both repositories. - Testing Done:
-
~ Performed basic test on a Git repository. It works. More tests need to be performed.
~ Test carried out on git repo.
+ + 1) Push with the review request id in the commit message. Review request closed. [PASSED]
+ 2) Push without a review request id in the commit message. (Review request closed based on the commit_id) [PASSED]. + 3) Push with non existent review request id. (Error: Review request does not exist) [PASSED] + 4) Push with review id in the message that is already submitted. (logged a warning: request id already submitted.) [PASSED] + 5) Push with review id in the message that has been marked as discarded. (review request marked as submitted.) [PASSED] - Commit:
-
7dd4cae02699b44f0f0ee88b06673d0e6f7c8899826c48f40cd6548ff37728661f9d451a4b950855
-
-
-
-
-
-
How would you feel about introducing another method that could do this check and fan out to the individual implementations?
-
dict.get()
defaults to None if the key doesn't exist, so you don't need to specify this second parameter. -
-
-
dict.get()
defaults to None if the key doesn't exist, so you don't need to specify this second parameter. -
dict.get()
defaults to None if the key doesn't exist, so you don't need to specify this second parameter. -
-
-
dict.get()
defaults to None if the key doesn't exist, so you don't need to specify this second parameter.
- Change Summary:
-
Added support for SVN and tested for the same.
- Testing Done:
-
~ Test carried out on git repo.
~ Test carried out on git and svn repo.
1) Push with the review request id in the commit message. Review request closed. [PASSED]
~ 2) Push without a review request id in the commit message. (Review request closed based on the commit_id) [PASSED]. ~ 2) Push without a review request id in the commit message. (Review request closed based on the commit_id for git and error looged for svn) [PASSED]. 3) Push with non existent review request id. (Error: Review request does not exist) [PASSED] 4) Push with review id in the message that is already submitted. (logged a warning: request id already submitted.) [PASSED] 5) Push with review id in the message that has been marked as discarded. (review request marked as submitted.) [PASSED] - Commit:
-
826c48f40cd6548ff37728661f9d451a4b950855b77457d0f977e3b4249f282d70de797f040acd01
- Testing Done:
-
~ Test carried out on git and svn repo.
~ Test carried out on git and svn repos.
1) Push with the review request id in the commit message. Review request closed. [PASSED]
2) Push without a review request id in the commit message. (Review request closed based on the commit_id for git and error looged for svn) [PASSED]. 3) Push with non existent review request id. (Error: Review request does not exist) [PASSED] 4) Push with review id in the message that is already submitted. (logged a warning: request id already submitted.) [PASSED] 5) Push with review id in the message that has been marked as discarded. (review request marked as submitted.) [PASSED]