Version 3 (modified by 12 years ago) (diff) | ,
---|
Contents
Lightweight code review of changesets
Notice: This plugin is unmaintained and available for adoption.
Description
This plugin adds a lightweight means to review changesets directly on existing changeset pages.
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:
When a review summary is provided, it gets added to any/all tickets referenced in the changeset (also shown above).
There are other good code review tools out there that I've used (e.g., 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.
See also: CodeReviewPlugin, PeerReviewPlugin, ExoWebCodeReviewPlugin
Configuration
- Install the plugin (after downloading and unzipping):
cd codereviewerplugin/0.12 sudo python setup.py bdist_egg sudo cp dist/TracCodeReviewer*.egg /your/trac/location/plugins/
See TracPlugins for more installation details and options. You'll likely need to restart Trac's web server after installation.
- Enable the plugin and if using the built-in
commit-updater
, disableCommitTicketReferenceMacro
:[components] tracopt.ticket.commit_updater.committicketupdater = enabled tracopt.ticket.commit_updater.committicketreferencemacro = disabled coderev.* = enabled
You can alternatively use the Trac Web Admin GUI to enable any or all rules.
- (optional) Customize the names for the three statuses (make sure there are always exactly three):
[codereviewer] status_choices = REJECTED,PENDING,PASSED status_default = PENDING
See the examples section below for more configuration options.
Bugs/Feature Requests
Existing bugs and feature requests for CodeReviewerPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from [download:codereviewerplugin here].
Source
You can check out CodeReviewerPlugin from here using Subversion, or browse the source with Trac.
Examples
The screenshots in the examples above show basic examples. There are some additional extensions:
Workflow
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:
- implementation
- codereview
- verifying
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:
[ticket-custom] phase.invalid_if.1 = verifying phase.invalid_when.1 = .codereviewstatus .pending (msg:Pending code reviews.) phase.invalid_if.2 = verifying phase.invalid_when.2 = .codereviewstatus:last .rejected (msg:The last code review did not pass.)
Jenkins
tbd
Recent Changes
- 17726 by rjollos on 2020-05-07 01:37:59
-
CodeReviewerPlugin 1.0.0dev: Fixed reviewer not used in ticket change entry
Refs #13079.
- 17705 by rjollos on 2020-04-29 02:31:14
-
CodeReviewerPlugin 1.0.0dev: Publish to PyPI
Fixes #13662.
- 17016 by jun66j5 on 2017-12-08 03:52:54
-
CodeReviewerPlugin 1.0.0dev: fix
ValueError
raising when configuration is invalid (refs #13344)
(more)
Author/Contributors
Author: robguttman
Maintainer: robguttman
Contributors:
Attachments (2)
- review1.png (71.1 KB) - added by 12 years ago.
- ticket1.png (39.4 KB) - added by 12 years ago.
Download all attachments as: .zip