Gerrit/New repositories

From MediaWiki.org
< Gerrit(Redirected from Git/New repositories)
Jump to: navigation, search

All new extensions are posted on Git. If you want to be a Gerrit project owner of code that's already in Gerrit, use Gerrit/Project_ownership. If you want to request an old SVN extension be moved to Git, ask here, and just mention the old repository in the comments.

Contents

Step 1: Get Git access [edit]

Access to Git is managed via Wikimedia Labs and integrated with Gerrit. You can get an account here.

There's information on Wikimedia Labs outlining how to access Wikimedia's Git installation once your account is setup.

Step 2: Review community expectations [edit]

MediaWiki is an open-source project and users are encouraged to make any MediaWiki extensions under an Open Source Initiative (OSI) approved GPLv2 compatible license (including MIT, BSD, PD). For extensions that have a compatible license, you can request developer access to the MediaWiki source repositories for extensions and get a new repository created for you. Alternatively, you may also post your code directly on your extension's page, although that is not the preferred method.

A developer sharing their code on the MediaWiki wiki or code repository should expect:

Feedback / Criticism / Code reviews
Review and comments by other developers on things like framework use, security, efficiency and usability.
Developer tweaking
Other developers modifying your submission to improve or clean-up your code to meet new framework classes and methods, coding conventions and translations.
Improved access for wiki sysadmins
If you do decide to put your code on the wiki, another developer may decide to move it to the MediaWiki code repository for easier maintenance. You may then request commit access to continue maintaining it.
Future versions by other developers
New branches of your code being created by other developers as new versions of MediaWiki are released.
Merger of your code into other extensions with duplicate or similar purposes — incorporating the best features from each extension.
Credit
Credit for your work being preserved in future versions — including any merged extensions.
Similarly, you should credit the developers of any extensions whose code you borrow from — especially when performing a merger.

Any developer who is uncomfortable with any of these actions occurring should not host their code directly on the MediaWiki wiki or code repository. You are still encouraged to create a summary page for your extension on the wiki to let people know about the extension, and where to download it. You may also add the {{Extension exception}} template to your extension requesting other developers refrain from modifying your code, although no guarantees can be made that an update will be made if deemed important for security or compatibility reasons. You may use the current issues noticeboard if you feel another developer has violated the spirit of these expectations in editing your extension.


Step 3: Request space for your extension [edit]

You'll be telling us your Wikimedia Labs username, what code review model you want, what paths in trunk/branches/tags you want, what you want the project name in gerrit to be, and (if this is an existing Subversion repository) giving us a link to your community consensus that you want to move to git. Click request, then fill in the fields on the page creation screen:

Step 4: Commit your extension [edit]

Once your extension's space is setup, you can commit your files and continue your work utilizing Git.


Step 5: Publish an extension page [edit]

To autocategorize and standardize the documentation of your existing extension, please see Template:Extension. To add your new extension to this Wiki: Please replace "MyExtension" with your extension's name:



Templates to use [edit]

Step 6: Continue development and enjoy! [edit]

You'll likely start to get reviews at this point for code style. You can get a jump on those by reading over coding conventions and security for developers, and making sure that your code follows these guidelines.

Find a couple of established MediaWiki hackers to look over your code and point out any flaws in it. For example, they may point you to another extension that is already in use whose functionality duplicates what you want, or could be easily extended to do what you want. In that case, you should use your newly-acquired Git access to work on the extension that is already available.


See also [edit]