wiki:PeerReviewPlugin

Distributed Peer Review of Source Code

Description

This plugin integrates a code review system for software developers into Trac. The interface integrates seamlessly with your repositories (Subversion and Git) and Tracs source browser, thereby allowing users to work in their known environment.

The plugin can be used when developing software for regulated environments like IEC 61508 by

  • enforcing proper processes using review workflows and assigned reviewers,
  • tracking the review status for every single source file of your software,
  • maintaining a paper trail for your review activities,
  • documenting your reviews by exporting them into MS Word docx files.

You may chose files from the repository and comment on them. Later on one may check the applied changes against the original file during a follow-up review using a diff view. File changes may be approved or disapproved depending on the outcome of the review.

The plugin is also suitable for reviewing changesets by integrating with the changeset page of Trac. There is a tutorial for changeset reviews available.

Key features:

  • Support for multiple repositories
  • Supports Git and Subversion repositories (Mercurial not tested but likely works, too)
  • Diff view of changes in follow up reviews similar to Tracs source browser
  • Use wiki formatting in comments
  • Inline display of comments
  • Mark comments as read
  • Wiki links for review resource similar to TracLinks
  • Customizable review workflows
  • Custom reports
  • Timeline events: show status changes for reviews
  • Create tickets right from the review page
  • Export data in MS Word docx format

Note: Trac 0.12 is supported up to V3.1, see peerreviewplugin/tags/0.12/3.1.

This is the main page with code reviews assigned to you and code reviews that you have created to be performed by others:

Main page with review overview

Main code review page: My Code Reviews

The plugin uses code from TestManagerForTracPlugin for the workflow feature (see TestManagerForTracPluginWorkflow) and persistence of objects (see TestManagerForTracPluginGenericClass). Thanks to Roberto Longobardi for making it available under the permissive bsd-license.

See also:

Documentation

More information can be found on the following pages:

Bugs/Feature Requests

Existing bugs and feature requests for PeerReviewPlugin are here.

If you have any issues, create a new ticket.

defect

93 / 99

enhancement

13 / 28

task

6 / 7

If you have any comments about the plugin or/and you would like to join the discussion, please see ticket #2850.

Download

Download the zipped source from here.

Multirepository support is available in trunk.

Source

Check out PeerReviewPlugin from here using Subversion, or browse the source with Trac.

Installation

Note: Trac 0.12 is supported up to V3.1, see peerreviewplugin/tags/0.12/3.1.

General instructions on installing Trac plugins can be found on the TracPlugins page.

Enable the plugin in your trac.ini file:

[components]
codereview.* = enabled

Configuration

Permissions

The permissions CODE_REVIEW_VIEW, CODE_REVIEW_DEV and CODE_REVIEW_MGR must be assigned as appropriate:

  • With permission CODE_REVIEW_VIEW users are able to only view code reviews.
  • Only users with permission CODE_REVIEW_DEV may perform code reviews by commenting on files.
  • Permission CODE_REVIEW_MGR is for administration of code reviews.

Workflow operation for reviews

You can configure a custom workflow operation set_review_owner for reviews:

[peerreview-resource_workflow]
change_owner = * -> *
change_owner.name = Change Owner to
change_owner.operations = set_review_owner
change_owner.permissions = CODE_REVIEW_MGR

This operation allows you to change the owner of a review. Possible users are taken from the same list as the one used when creating a review. In the given example you need the permission CODE_REVIEW_MGR to perform the operation.

Project list

When creating a review you can specify an associated project. The projects are taken from the list created by SimpleMultiProjectPlugin. If you don't have this plugin installed or you want to create another list, you may do so using the following settings:

[peerreview]
projects = Project1, Project2, Project3

Ticket creation

It is possible to create tickets with review details right from within the review page. A ticket preview and a button for filling the New Ticket page with data will be shown on the view page of a review if the review status is in this list of states.

Note: You must be the review author or a manager to use this feature.

This is the default list of states for which the ticket section is shown:

[peerreview]
show_ticket = reviewed, in-review, approved, disapproved

Other setting

reviewer_locked_states A reviewer may no longer comment on reviews in one of the given states. The review owner still may comment. Used to lock a review against modification after all reviewing persons have finished their task. reviewed
terminal_review_states Ending states for a review. Only an administrator may force a review to leave these states. Reviews in one of these states may not be modified. closed,approved,disapproved

Recent Changes

18288 by Cinc-th on 2021-05-12 06:30:30

PeerReviewPlugin: improvements to ticket creation:

  • You may specify a list of review states for which the ticket creation section is shown.
  • A ticket template may be provided as a wiki page CodeReview/TicketTemplate
  • Ticket creation section is foldable now
  • Added documentation to plugin
18287 by Cinc-th on 2021-05-11 11:52:23
PeerReviewPlugin: improvements to changeset reviews:

  • Allow to create another changeset review when old review was closed.
  • Show pin icon in lines with comments
  • Hide/show comments

Some minor improvements to presentation like titles for revision links.

Refs #14007

18286 by Cinc-th on 2021-05-10 10:49:44
PeerReviewPlugin: review creation for a changeset failed if the changeset contained any deleted files.

Refs #14007

(more)

Author/Contributors

Author: Team5
Maintainer: Cinc-th
Contributors: sontek, djeebus, proofek, blongden, bselby, andersm, rjollos, yudivian

Last modified 22 hours ago Last modified on May 12, 2021, 7:36:06 AM

Attachments (2)

Download all attachments as: .zip