1.8.0 • Published 7 years ago
joyent-grr v1.8.0
This repo provides a single grr CLI tool to help with using Joyent's code
review (CR) tool, Gerrit, at: https://cr.joyent.us/.
Grr is opinionated. The expected workflow is this:
- You call
grr <issue>to tell grr to create a temporary local branch (grr-<issue>) for work on this issue (if you are currently on "master"), or to use your current branch (if you are already on a non-"master" branch). Grr will fetch issue details and remember them (in local git config). Optionally you can specify "extra issues" that your changes cover, viagrr -a <extra-issue>. Those issues will be included in the commit message. - You make one or more commits,
git commit -am ..., for your change. - You call
grrto create/update the CR. Grr will squash the commits (in a temporarygrr/auto/<issue>branch), push the commit (with the appropriate commit message) to cr.joyent.us, and remember the CR number. - Get approvals for your CR, and/or cycle back to step #2.
- When you get approval, run
grrone last time to update the commit message with "Reviewed by" and "Approved by" lines. - Integrate your change (in the web UI, grr doesn't yet do this), then use
grr -Dto clean up (delete thegrr-<issue>branch and switch back to master).
See this example for a walk through.
Install
npm install -g joyent-grrVerify that it is installed and on your PATH:
$ grr --version
grr 1.2.0
https://github.com/joyent/grrYou'll need to setup your account in Joyent's Gerrit by following the steps at https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md#new-user-instructions
Development Hooks
Before commiting be sure to, at least:
make check # lint and style checks
make test # run testsA good way to do that is to install the stock pre-commit hook in your clone via:
make git-hooksLicense
MPL 2.0