Changes between Version 2 and Version 3 of CodeReviewerPlugin
- Timestamp:
- May 15, 2012, 5:37:13 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodeReviewerPlugin
v2 v3 5 5 == Description == 6 6 7 This plugin adds a lightweight means to review changesets .7 This plugin adds a lightweight means to review changesets directly on existing changeset pages. 8 8 9 9 [[Image(review1.png)]] 10 10 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. 11 This 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 15 When a review summary is provided, it gets added to any/all tickets referenced in the changeset (also shown above). 16 17 There 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. 12 18 13 19 See also: CodeReviewPlugin, PeerReviewPlugin, ExoWebCodeReviewPlugin 14 20 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 48 See the examples section [wiki:CodeReviewerPlugin#Examples below] for more configuration options. 49 15 50 == Bugs/Feature Requests == 16 51 … … 29 64 You can check out CodeReviewerPlugin from [http://trac-hacks.org/svn/codereviewerplugin here] using Subversion, or [source:codereviewerplugin browse the source] with Trac. 30 65 31 == Example == 66 == Examples == 67 The screenshots in the examples above show basic examples. There are some additional extensions: 32 68 33 dynfields option 69 === Workflow === 70 There 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 34 74 75 If 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 === 85 tbd 35 86 36 87 == Recent Changes ==