Skip to content

Commit f61d68b

Browse files
Update CONTRIBUTING to reflect ReviewBoard.
1 parent fb2e10d commit f61d68b

File tree

1 file changed

+76
-10
lines changed

1 file changed

+76
-10
lines changed

CONTRIBUTING.md

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Quick links
1313

1414
* issue tracker: https://launchpad.net/juju-core
1515
* continuous integration: http://juju-ci.vapour.ws:8080/
16+
* code review: http://reviews.vapour.ws/
1617

1718
Documentation:
1819
* https://juju.ubuntu.com/docs/
@@ -353,16 +354,81 @@ https://help.github.com/articles/using-pull-requests
353354
Code review
354355
-----------
355356

356-
A branch needs at least one approval review in order to land. By
357-
convention, this is signaled by `LGTM` in a review comment. In the rare
358-
case where a proposal has an issue that means it should not land,
359-
`NOT LGTM` can be used as a veto. Often several rounds of suggestions are
360-
made without either marker, and `LGTM` is added when the comments are
361-
addressed.
362-
363-
After a proposal has received an `LGTM`, the landing must be notified to
364-
test and merge the code into master. This is done by a member of the
365-
juju project adding the magic string `$$merge$$` in a comment.
357+
The juju project uses peer review of pull requests prior to merging to
358+
facilitate improvements both in code quality and in design. The code
359+
review tool is ReviewBoard, hosted at http://reviews.vapour.ws/.
360+
361+
The site uses github OAuth for authentication. To log in simply go to
362+
login page and click the "github" button. The first time you do this,
363+
it will redirect you to github to approve access and then redirect you
364+
back. This first time is the only one where you will be redirected to
365+
github. Furthermore, ReviewBoard will keep you logged in between visits
366+
via session cookies.
367+
368+
That first time you log in, a ReviewBoard account will be created for
369+
you using your github username. However, your email address is not
370+
added. If you want to receive review-related email, be sure to add your
371+
email address to your ReviewBoard profile.
372+
373+
Once you have logged in to ReviewBoard for the first time you are ready
374+
to create new review requests. Each review request should be associated
375+
with a pull request on github. So after your pull request is created,
376+
follow these steps:
377+
378+
1. run "rbt post" (see more info below on RBTools)
379+
2. follow the link and hit the "publish" button (or use the "-p" option)
380+
3. add a comment to the PR with a link to the review request
381+
382+
At this point your review request should get reviewed. Make sure to
383+
address the feedback. Your request might go through several cycles of
384+
feedback before the patch is approved or rejected. Once you get a
385+
"ship it" from a member of the juju project, and there are not any
386+
"NOT LGTM" comments in ReviewBoard or github, you are ready to have your
387+
patch merged:
388+
389+
1. notify the landing bot to test and merge the branch into master
390+
- this is done by a member of the juju project by adding the magic
391+
string `$$merge$$` in a comment on the PR.
392+
2. once merged, close your review request as "submitted"
393+
3. congratulations!
394+
395+
To update an existing pull request:
396+
397+
1. push your updated branch to your github clone (this will
398+
automatically update the pull request)
399+
2. run "rbt post -u" or "rbt post -r #"
400+
3. hit the "publish" button (or use the "-p" option)
401+
402+
Important: Make sure you use one of those two options. Otherwise there
403+
is a good chance that ReviewBoard will create a new review request,
404+
which is a problem because revisions are linked to review requests
405+
(even discarded ones). So the accidental review request would prevent
406+
you from updating the correct one after that. If that happens you will
407+
need to get one of the ReviewBoard admins to delete the accidental
408+
review request. Considering the overhead involved for everyone, it
409+
would be better just make sure you always use "-u" or "-r" for updates.
410+
411+
Here is more information about RBTools and the "rbt" command:
412+
413+
* see https://www.reviewboard.org/docs/rbtools/0.6/
414+
* you will need to install rbt before you can use it
415+
* the first time you run "rbt post", rbtools will request your
416+
ReviewBoard credentials. Since users do not have passwords you must
417+
trigger OAuth authentication:
418+
- username: <github username>
419+
- password: oauth:<github username>@github
420+
* when using rbt, make sure you are on the branch that matches the PR
421+
for which you are creating a review request
422+
* make sure that branch is based on an up-to-date master
423+
* the rbtools documentation includes information on various helpful
424+
command-line options
425+
* for instance, "rbt post --parent" allows you to chain review requests
426+
* if the repo does not have a .reviewboardrc file, you will need to run
427+
"rbt setup-repo" to generate one; however if one of the juju repos is
428+
missing that file, it should be generated and committed
429+
* if you followed the recommendation above on git "remotes" (which you
430+
should have), you will need to make sure you have the following in
431+
the .reviewboardrc file: TRACKING_BRANCH = "upstream/master"
366432

367433
Continuous integration
368434
----------------------

0 commit comments

Comments
 (0)