Changes between Version 2 and Version 3 of CodeReviewerPlugin


Ignore:
Timestamp:
May 15, 2012 7:37:13 PM (2 years ago)
Author:
robguttman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeReviewerPlugin

    v2 v3  
    55== Description == 
    66 
    7 This plugin adds a lightweight means to review changesets. 
     7This plugin adds a lightweight means to review changesets directly on existing changeset pages. 
    88 
    99[[Image(review1.png)]] 
    1010 
    11 There are other good code review tools out there that I've used (e.g., [http://code.google.com/p/gerrit/ gerrit]) but I needed something lightweight that fit well into our existing Trac ticket workflow.  And so this plugin was born. 
     11This plugin comes with its own {{{CommitTicketReferenceMacro}}} which can be optionally used instead of the built-in one to display the current status within the ticket: 
     12 
     13[[Image(ticket1.png)]] 
     14 
     15When a review summary is provided, it gets added to any/all tickets referenced in the changeset (also shown above). 
     16 
     17There are other good code review tools out there that I've used (e.g., [http://code.google.com/p/gerrit/ gerrit]) but I wanted something very lightweight that fits well into our existing Trac ticket workflow.  The few existing Trac-based code review plugins (below) appear to be unmaintained.  And so this plugin was born. 
    1218 
    1319See also: CodeReviewPlugin, PeerReviewPlugin, ExoWebCodeReviewPlugin 
    1420 
     21== Configuration == 
     22 1. Install the plugin (after downloading and unzipping): 
     23    {{{ 
     24    cd codereviewerplugin/0.12 
     25    sudo python setup.py bdist_egg 
     26    sudo cp dist/TracCodeReviewer*.egg /your/trac/location/plugins/ 
     27    }}} 
     28 
     29    See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options.  You'll likely need to restart Trac's web server after installation. 
     30 
     31 2. Enable the plugin ''and'' if using the built-in {{{commit-updater}}}, disable {{{CommitTicketReferenceMacro}}}: 
     32    {{{ 
     33    [components] 
     34    tracopt.ticket.commit_updater.committicketupdater = enabled 
     35    tracopt.ticket.commit_updater.committicketreferencemacro = disabled 
     36    coderev.* = enabled 
     37    }}} 
     38 
     39    You can alternatively use the Trac Web Admin GUI to enable any or all rules. 
     40 
     41 3. (''optional'') Customize the names for the three statuses (make sure there are always exactly three): 
     42    {{{ 
     43    [codereviewer] 
     44    status_choices = REJECTED,PENDING,PASSED 
     45    status_default = PENDING 
     46    }}} 
     47 
     48See the examples section [wiki:CodeReviewerPlugin#Examples below] for more configuration options. 
     49  
    1550== Bugs/Feature Requests ==  
    1651 
     
    2964You can check out CodeReviewerPlugin from [http://trac-hacks.org/svn/codereviewerplugin here] using Subversion, or [source:codereviewerplugin browse the source] with Trac. 
    3065 
    31 == Example == 
     66== Examples == 
     67The screenshots in the examples above show basic examples.  There are some additional extensions: 
    3268 
    33 dynfields option 
     69=== Workflow === 
     70There are many ways to integrate code reviews into your Trac ticket workflow.  As just one example, you may have a {{{phase}}} custom field that includes different phases: 
     71 1. implementation 
     72 1. codereview 
     73 1. verifying 
    3474 
     75If you wanted to prevent the {{{phase}}} from passing "codereview" until all pending code reviews were completed and the last code review passed, you can add the following rules for the DynamicFieldsPlugin: 
     76    {{{ 
     77    [ticket-custom] 
     78    phase.invalid_if.1 = verifying 
     79    phase.invalid_when.1 = .codereviewstatus .pending (msg:Pending code reviews.) 
     80    phase.invalid_if.2 = verifying 
     81    phase.invalid_when.2 = .codereviewstatus:last .rejected (msg:The last code review did not pass.) 
     82    }}} 
     83 
     84=== Jenkins === 
     85tbd 
    3586 
    3687== Recent Changes ==