Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jclouds Wiki" for 
change notification.

The "How to contribute" page has been changed by IgnasiBarrera:
https://wiki.apache.org/jclouds/How%20to%20contribute

New page:
= How to contribute to jclouds =

Welcome and thank you for your interest in contributing to jclouds! This guide 
will take you through the process of making contributions to the jclouds code 
base.

== Contributor license agreement ==

Before contributing, you may have to sign the 
[[http://www.apache.org/licenses/#clas|Apache ICLA]]. All contributions and 
patches attached to a [[https://issues.apache.org/jira/browse/JCLOUDS|JIRA]] 
issue are assumed to be under the agreement, so even if small patches and 
changes may not require an explicit signature, it is always a good idea to have 
it in place.

== The Git repositories ==

The jclouds Git repositories are hosted in the ASF infrastructure, but there 
are also have mirros in Github. This is the current repository layout:

|| Apache || https://git-wip-us.apache.org/repos/asf?s=incubator-jclouds || The 
main and official repositories ||
|| Github || https://github.com/jclouds/jclouds || Mirrors from the ASF 
repositories, used to accept contributions and do code reviews ||
|| Github || https://github.com/jclouds/legacy-jclouds || The legacy 
repositories, as they were before the migration to the ASF, used to keep old 
code ||

== How to contribute ==

 1. Create a [[https://issues.apache.org/jira/browse/JCLOUDS|JIRA]] issue for 
your feature request/bugfix.
 2. Fork the mirrored repository from Github, clone your form and add the 
upstream repository:
  {{{
  git clone [email protected]:YOUR_GITHUB_USER/jclouds.git
  cd jclouds
  git remote add upstream git://github.com/jclouds/jclouds.git
  }}}

 3. Make sure you are up to date with the last version of the master branch:
  {{{
  git fetch upstream
  git rebase upstream/master
  }}}

 4. Create a topic branch for your changes:
  {{{
  git checkout -b my_feature
  }}}

 5. Add and commit all changes, and push the topic branch to your fork 
([[http://stackoverflow.com/questions/5968964/avoid-unwanted-merge-commits-and-other-commits-when-doing-pull-request-in-github|why
 rebase?]]):
  {{{
  git add .
  git commit -m "JCLOUDS-XX: My changes" # Add the JIRA ID in the commit message
  git fetch upstream                     # Verify that your branch still is up 
to date
  git rebase upstream/master
  git push origin my_feature
  }}}

 6. Once your changes are pushed to your fork, 
[[https://help.github.com/articles/using-pull-requests|send us a pull request]].
 7. Add a comment in the JIRA issue with a link to the pull request so we know 
the code is ready to be reviewed.

== The review process ==

Someone will review your pull request before it is merged. This process can 
take a while, but if you feel no one is taking care of it, join the #jclouds 
IRC channel in Freenode and ask for a review. You can also drop a message to 
the development mailing list.

During the review process you may be asked to do some changes. When applying, 
just add the new commits to the pull request without squashing the commits 
(unless you are asked to do it). This way reviewers can focus only in the 
changed stuff instead of going over the entire changes again.

Once all the changes are done and the pull request is ready, the commits in the 
pull request '''__must be squashed and rebased to the latest upstream 
version__'''. This will allow us to generate a clean patch and merge it 
properly.

== Commiting the changes to the ASF repo ==

If you are not a commiter, you just have to wait. The reviewer will take care 
of commiting the changes.

If you are a commiter, you can follow these steps:

 1. Save the patch from the Github patch link (just appehd '.patch' to the pull 
request link to get it). This patch will keep the authorship of the commit, so 
we should use it instead of the diff.
 2. If the commit message needs to be edited, edit it in the patch file.
 3. Pull the changes in the ASF repository to make sure you have the latest 
version of the master branch.
  {{{
  git remote add asf 
https://git-wip-us.apache.org/repos/asf/incubator-jclouds.git
  git fetch asf
  git checkout master
  git rebase asf/master
  }}}
 4. Apply the patch preserving the original author:
  {{{
  git am JCLOUDS-XX.patch
  }}}
 5. Run a build to make sure everything works as expected after applying the 
patch and push the changes once the build succeeds.
  {{{
  mvn clean install
  git push asf master
  }}}
 6. If there are no issues with the applied patch, attach the patch file to the 
JIRA issue, and mark it as Resolved.
 7. Close the pull request and leave a comment saying it has been merged.

Reply via email to