Review Board Gateway hosting service integration
Review Request #6850 — Created Jan. 31, 2015 and submitted — Latest diff uploaded
This is the Hosting Service that is meant to support rb-gateway.
Review Board Gateway is meant to be an easy to deploy hosting service that the repository owner can self host. It is supposed to provide an API in front of repositories that works closely with Review Board for retrieving files, checking file existance, etc. It also currently supports Review Board's Post Commit UI which includes the ability to get commits, get branches, and get a commit diff (change).
I added a git repository using the hosting service form on my local instance of review board of type 'Review Board Gateway', called rbgateway-test (with the authorized credentials). I then added a .reviewboardrc to my local repository pointing to rbgateway-test. I typed 'rbt post' and it successfully posted to my local instance under rbgateway-test. I also checked rbt post, and rbt post -u on updating an existing file, and successfully saw GET requests in rb-gateway server for requesting file blob when viewing the diff; successfully viewed the diff. Post Commit UI was also verified to work, as seen in the screenshot. When clicking on one of the commits in the Post Commit UI, a new review request was opened successfully.
Added unit tests that passed for:
- checking whether ReviewBoardGateway can find the repository
- checking whether authorization sends the expected data
- checking the service support capabilities
- checking the repository field values
- checking the get_branches function
- checking the get_commits function
- checking the get_change function