Review it! is a review tool for git-based projects.
For the sake of simplicity, the work/review processes is split in two components:
- Command-line tool (requesting review for patches)
- Web-based code review dashboard
You need ruby at least 2.2.2, then install the gem dependencies.
$ bundle install --without development,test
Then create a postgres database called
reviewit and run:
For more information about database configuration look into Rails documentation and edit the file
$ RAILS_ENV=production RAILS_SERVE_STATIC_FILES=1 unicorn_rails
Reviewit! execute git commands using sidekiq, so you need a redis-server running and accessible by Sidekiq, to start sidekiq
in the development environment, use
bundle exec sidekiq, if you are using the deploy script sidekiq is automatically started
To configure mail delivery options check the file
Setting up your Project
- Register your project in the web interface (just needs a name, repository URL and a list of people involved on the project)
- Go to the directory where your project working copy is.
- Type the command you saw in the web interface.
Workflow for Writing Code
Creating a Merge Request
- Write some code!
- Commit it to git like you are used to do
- Feeling ready for review? Just run
review push BRANCHcommand.
Your patch will be posted for review. Once accepted, it will be merged into
review push 3.4.0 will create a merge request with your HEAD commit targeting the 3.4.0 branch.
Updating a Merge Request
- Write some code!
- Update your existing patch (git commit --amend)
Workflow for Reviewing Patches
Accepting a Merge Request
Go to web interface and click accept and the patch should be merged, or run
review accept X where X is the MR id.
Reviewit will try to apply and commit your patch (git am), it will tell you if it can't. And if it can't, solve the conflicts (git rebase) then send it again for review.
List Pending Reviews for your Project
Open a Review in your Browser
review open X, where X is the MR id, you can see the MR ids when listing pending reviews.
If X is ommited it will open the current review, if it exists.
Open a Review in your Terminal
Don't want to wait the browser to start up? Just run
review show X, where X is the MR id.
Abandon a Review
You can do it on web interface or by running
Applying a patch from some MR on your working copy
Sometimes you aren't a believer and want to try the patch yourself, this is easy, just run
review apply X where X is the MR id.
Clean up dead/reviewed branches
review cleanup, it will issue a
git remote prune <your_remote> and remove all local branches for merge requests
already accepted or abandonned.