Extension:CodeReview

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
CodeReview

Release status: beta

Implementation Special page, API
Description Code review tool with Subversion support
Author(s) Brion Vibber, Aaron Schulz, Alexandre Emsenhuber and Chad Horohoe
MediaWiki 1.14a
License GNU General Public License 2.0 or later
Download Download snapshot

Subversion [Help]
Browse source code

Example MediaWiki.org

CodeReview extension allows to review SVN commits on a MediaWiki installation. It adds two new special pages, Special:Code and Special:RepoAdmin. The former can be accessed by everyone, the latter only by users with the repoadmin user right.

Contents

[edit] Installation

Note Note: These instructions might be missing essential bits and pieces, feel free to improve them.

  1. Download the files from SVN and place them in $IP/extensions/CodeReview/
  2. Run codereview.sql against your database with a command like mysql -u [your mysql username here] -p[mysql password here] [database name here] < codereview.sql
  3. Add
    require_once("$IP/extensions/CodeReview/CodeReview.php");
    into your wiki's LocalSettings.php
  4. Installation can now be verified through your wiki's Special:Version.

To set up a repository:

  1. Browse to Special:RepoAdmin
  2. Enter a repository name into the input box and press "Create" button
  3. Enter the three required paths; SVN, Bugzilla and ViewVC paths. These paths should be valid URLs, not local paths. For example, http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3 for SVN etc.
  4. Press OK.
  5. Now the repository has been created and you'll need to import SVN data to it. You can do this with the svnImport.php maintenance script in CodeReview directory. To run it, type: php svnImport.php YourProjectName
  6. After the import is done, you should be able to review commits through Special:Code/YourProjectName, where YourProjectName is the name of the project you gave in Special:RepoAdmin.

[edit] Requirements

A working installation of the command-line SVN client is needed, and the svn PECL extension is recommended.

[edit] User rights

By default, everyone (including anonymous users) can post comments (codereview-post-comment), set the status of a commit (codereview-set-status), add tags (codereview-add-tag) and remove them (codereview-remove-tag).

Only stewards can administrate the SVN repository (repoadmin) and access Special:RepoAdmin.

[edit] See also

This extension is being used on one or more of Wikimedia's wikis. It means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki is produced by Special:Version on that wiki.

Personal tools