any recommendation on how to integrate code review tools?

665 views
Skip to first unread message

Liyu Wang

unread,
Jan 31, 2014, 8:08:49 AM1/31/14
to git...@googlegroups.com
HI,
We are using GitBlit as the code repo, recently I got request to intergrate code review. something like Gerrit, just wondering how hard is that to integrate Gitblit with Gerrit or any other similar tools?

Thanks,
Liyu 

James Moger

unread,
Jan 31, 2014, 8:18:32 AM1/31/14
to git...@googlegroups.com, Luca Milanesio
It depends on how you define "integrate".

GerritForge maintains a Gitblit-Gerrit plugin which allows you to run Gitblit inside Gerrit.  In this scenario, Gitblit is a viewer and Gerrit is the gatekeeper. (@Luca: I don't know why this is so hard to find with Google!)

I am implementing a collaboration feature for Gitblit called Tickets which is not yet finished.  This feature is something like a Pull Request, but it does not currently offer commit or line comments.  It does permit general discussion comments.

https://dev.gitblit.com/tickets/gitblit.git/1

I am not aware of any other "integrations"... although the community might know.

-J

Luca Milanesio

unread,
Jan 31, 2014, 8:39:56 AM1/31/14
to James Moger, git...@googlegroups.com
... need to possibly add "GitBlit" more often to what we do :-)

However I am willing to do the opposite as well: that means "plug" Gerrit as code review engine "under the cover" for GitBlit ... just did not have enough time to do it yet :-(

Luca.

Jeff Jensen

unread,
Jan 31, 2014, 8:46:19 AM1/31/14
to git...@googlegroups.com
That would be very interesting... less setup, integration, problems, et al for use.  My team wants to use something but still not sure of an approach yet.


--
You received this message because you are subscribed to the Google Groups "gitblit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitblit+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Luca Milanesio

unread,
Jan 31, 2014, 8:57:21 AM1/31/14
to git...@googlegroups.com
My idea is simple:
1) Gerrit is at the end of the day a JGit server with a set of powerful code-review tools
2) Gerrit exposes its functionalities through a REST-API

I thought about just making a "scaled down" build of Gerrit that exposes just the REST-API and use them from GitBlit UX.
With regards to receiving the contributions, they can be done easily using either the Gerrit's "refs/for/<target>" notation or the GitHub fork&pull model ... at the end of the day it is just a way to say to the server: "hey, that's my code can you upload it for review ?"

If anyone want to help out, I would be happy to do it as a joint effort :-)

At the moment what you can do with the Gerrit/GitBlit plugin is different (see http://www.slideshare.net/lucamilanesio/gitblit-plugin-for-gerrit-code-review)
- GitBlit is "packaged as Jar" and is loaded as Gerrit plugin
- Gerrit exposes a real GitBlit instance under a sub-url and lives in the same Jetty/JVM container (one server runs both Gerrit and GitBlit, no libraries duplication, shared JGit cache)
- Gerrit hooks into GitBlit for:
  * Browsing code
  * Deep-link into commit IDs

The GitBlit that runs within Gerrit is not a "Children of a Lesser God" but it is instead fully featured: just some of the overlaps with Gerrit are disabled for not generating confusion or security leaks.
(i.e. authentication, authorisation and Git protocol is delegated to Gerrit)

In theory you could enable them again by editing your $GERRIT_SITE/etc/gitblit.properties

Luca.

James Moger

unread,
Jan 31, 2014, 12:32:00 PM1/31/14
to git...@googlegroups.com
> it is instead fully featured

Gitblit is a Git server.  If you disable all the Git serving bits for the plugin then it is not a "fully featured" Gitblit.  Having said that, you must disable all those bits for Gerrit.  Hence my claim that the Gitblit-plugin is a (prettier) viewer for Gerrit repositories.

-J

Luca Milanesio

unread,
Jan 31, 2014, 12:56:09 PM1/31/14
to git...@googlegroups.com
Right ... but you can enable it back, It is there if you want to use it !

Use with care :-)

Luca.

Luca Milanesio

unread,
Jan 31, 2014, 1:01:01 PM1/31/14
to git...@googlegroups.com
... thinking about it, I remember that Shawn Pearce said that the Google's Gerrit instance *does not* serve the Git protocol: they are using it only for the code-review part.

So in theory it would even be more similar to the way that gerrit-review.googlesource.com works, if you enable the Git protocol on Gitblit. :-)
In that case you manage all the security through Gitblit and just do the code-review part in Gerrit: does it make sense ?

Luca.

James Moger

unread,
Jan 31, 2014, 2:13:55 PM1/31/14
to git...@googlegroups.com
Granted I am not all that familiar with Gerrit's internals but it seems unlikely to me that it would allow git:// pushes - especially with CLAs and all that.  Do you mean it to say there it only advertises ref/changes/* for pulling using git://?  You've lost me.

-J

Luca Milanesio

unread,
Jan 31, 2014, 4:11:19 PM1/31/14
to git...@googlegroups.com
Need to ask exactly Shawn how he did it ... but he managed to have Gerrit serving *only* the refs/for/* and refs/changes/* whilst the rest of the traffic going through a standard Git server.

Luca.

On 31 Jan 2014, at 19:13, James Moger <james...@gmail.com> wrote:

Granted I am not all that familiar with Gerrit's internals but it seems unlikely to me that it would allow git:// pushes - especially with CLAs and all that.  Do you mean it to say there it only advertises ref/changes/* for pulling using git://?  You've lost me.

-J

Shai Gilboa

unread,
Sep 7, 2014, 4:14:50 AM9/7/14
to git...@googlegroups.com
Hi,

I have a GitBlit server and similar to Liyu's need, I now need to integrate a code review tool to it.
I played a bit with the Gerrit GitBlit plugin, but from what I found, and from reading about this, the plugin is meant to be more of a viewer than an actual GitBlit server allowing admin etc.

I'm looking for a way to have the GitBlit stay as the main hosting server and have Gerrit only as a 'gatekeeper' managing the code review requests - something like a Gerrit plugin for GitBlit.
Every search for such a thing ends up with GitBlit plugin for Gerrit.

Did someone ever manage to have such a solution? Is there a different option to have code review part of GitBlit?
Should one maybe think about migrating out of GitBlit to something like Phabricator?

@Luca - you wrote that Shawn(?) might have managed to accomplish GitBlit with Gerrit somehow, but no additional information was provided aftermath. 

Many thanks to any reply!

Cheers,
Shai

Florian Zschocke

unread,
Sep 7, 2014, 5:49:17 PM9/7/14
to git...@googlegroups.com
Shai,

I am faced with a similar situation. We have Gitblit installed and now the request for code reviews is coming up. I don't want to replace Gitblit with Gerrit as it is a fabulous tool. Using Gitblit as a viewer in Gerrit is also not my preferred option since Gerrit seems to overweight to me, requiring a database and all.
I am currently looking into the possibilities of using the new ticket system of Gitblit for code reviews. I believe that it offers enough to provide code reviews, so far my only concern is the permission model which seems not to be team friendly.
Have you considered using Gitblit tickets?

Best regards,
Florian

Shai Gilboa

unread,
Sep 11, 2014, 2:20:10 AM9/11/14
to git...@googlegroups.com
Hi Florian,

It just clicked to me that GitBlit tickets can be used for code review and I'm now starting to investigate this.
I still need learn what it offers and see how it can used in the simplest way by my team.

I'll share here what I find, and will be happy to learn your findings.

Regards,
Shai

Shai Gilboa

unread,
Sep 16, 2014, 3:15:03 AM9/16/14
to git...@googlegroups.com
@Florian,

I investigated the GitBlit Tickets usage for Code Review, and together with restricting access to repositories it seems to give sufficient answer for Code Review needs.
Just a matter of training and using only refs/for/<branch> for creation and then using ticket/<ticket id> branches for update.

Regards,

Praveen Kumar

unread,
Oct 18, 2014, 9:12:21 AM10/18/14
to git...@googlegroups.com
Hi Shai/Florian,

I'm also facing the similar situation. We started using Glitblit as a master repo for morethan 6 months  and 20+ developers using it. My organization is not ready to replace Gitblit with Gerrit.
So looking for a Gerrit plug-in that can be used on top of Gliblit repo. But couldn't find anything yet.

Conversation history looks that it is a month old. Would like to know updates from you frndz..
And did any of you tried "Tickets" feature and doesn't it actually replaces Gerrit ???


Thanks
Praveen

James Moger

unread,
Oct 18, 2014, 12:09:44 PM10/18/14
to git...@googlegroups.com
Hi Praveen,

Tickets is something like a hybrid of GitHub Pull Requests and Gerrit Change Review.  You can think of it as versioned, collaborative branches with notifications.  Tickets is a basic alternative to those other mechanisms - but it is not as full-featured as either one.

This screencast gives a pretty good demo of it:

Looking for a Gerrit plugin...  there is none.  What there is, however, is the opposite: a Gitblit plugin for Gerrit.  You'll have to go asking on the Gerrit mailing list for details on that since it is not part of the Gitblit project.

-J

Praveen Kumar

unread,
Oct 19, 2014, 6:10:36 PM10/19/14
to git...@googlegroups.com
Many Thanks James!!

I had a look at the screencast and it is really good and gives me better understanding of "Tickets".
I'm going to give it a try today in our Gitblit repo and like to see how best it suits our needs.

Thanks,
Praveen
Reply all
Reply to author
Forward
0 new messages