I'm trying to integrate Gitlab server that our company has been using with a new ReviewBoard server. From everything I've read about ReviewBoard setup, the most straightforward way to integrate git-like repositories is to use "Raw file URL mask" field if the repository has a web front end.
Luckily, Gitlab, appears to support such a front end and even has a well documented public API: https:///api/v2/projects//repository/commits//blob?private_token=&filepath=
In ReviewBoard's repository setup, one can specify a custom URL that could be used to retrieve individual files from the git server. This URL has two placeholders:
Unfortunately, I have learned that Gitlab's API expects SHA1 of the commit, not of the individual file and ReviewBoard as far as I can tell only sends SHA1 of the individual file but not of the commit
Reviewboard 1.7.21 includes support for GitLab http://www.reviewboard.org/news/2014/01/14/review-board-1-7-21-released/
I started a discussion on reviewboard google group about this. It appears that being able to retrieve a file by its own SHA1 is something that many Git web front-ends were missing before but now are adding in. Unfortunately, Gitlab is behind on this feature, so they simply don't have it (yet?) but others do.
The solution we found was to install Gitweb alongside Gitlab on the same host machine. Then we simply pointed Review Board to use Gitweb API while our developers continue to use Gitlab.
One important thing to note. Review Board documentation (at least for version 1.6) has a typo in the example Raw file URL mask value for gitweb. This is the correct URL format:
http://servername/?p=relative path to git repo;a=blob_plain;f=<filename>;h=<revision>
In their documentation, last parameter's name is hb but it should be h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With