Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Lyo/ContributorsGettingStarted"

< Lyo
Line 9: Line 9:
 
The Lyo project's Git [http://git.eclipse.org/c/lyo repositories].
 
The Lyo project's Git [http://git.eclipse.org/c/lyo repositories].
  
== Setting up a GitHub clone ==
 
  
Rather than cloning the repositories directly from eclipse.org, we recommend you create an account on GitHub and fork the projects repository mirrors there.
+
== Gerrit and Lyo ==
This will allow you to use GitHub's Pull Request feature to inform project committers when you have a proposed patch or contribution for consideration.
+
  
=== Currently active GitHub mirrors ===
+
Lyo uses Gerrit to accept, review and approve code contributions from the community.   Please see [Gerrit | the Eclipse Gerrit guide ] for information on configuring EGit or the command line to push to the Eclipse Gerrit instance.  
* Reference implementations for OSLC ([[Lyo/LyoRio|RIOs]]) :  https://github.com/eclipse/lyo.rio.git
+
* [[Lyo/LyoTestSuite|Test suites]] for OSLC:  https://github.com/eclipse/lyo.testsuite.git
+
* Example server projects:  https://github.com/eclipse/lyo.server.git
+
  
=== Setting up Git for use with GitHub ===
+
== Lyo contribution process ==
  
See [http://help.github.com/mac-set-up-git/ MacOS], [http://help.github.com/win-set-up-git/ Windows] or [http://help.github.com/linux-set-up-git/ Linux] instructions for configuring your GitHub SSH keys.
+
You're ready to contribute a bug fix or some new functionality to Lyo?  Great. Here's what you need to do:
  
=== Creating a repo on GitHub for use with Lyo ===
+
1 Make sure there is a [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Lyo Bugzilla bug] open for the work that you are doing.  Make a comment in the bug or on the [mailto:lyo-dev.org mailing list] that you want it assigned to you.
 +
1 Pull the latest Lyo code from the appropriate [http://git.eclipse.org/c/lyo Lyo git repository]
 +
1 Code your change - make sure you update any copyright headers as needed.
 +
1 Commit your change locally - all commits must include the Bugzilla number in the commit message
 +
1 Push the code to the appropriate Lyo Gerrit repository. 
 +
1 Visit the [https://git.eclipse.org/r/ Gerrit review instance] and login
 +
1 Click on your new review request and add some reviewers
 +
  1 Add at least one of the project committers (fiedler.mf@gmail-dot-com or spadgett@us-dot-ibm-dot-com are good choices) as a reviewer
 +
  1 Add any others you think would be able to provide a valuable review
 +
1 Edit the Bugzilla bug tracking this work and add this statement (only if it is true!!):  "I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use."
 +
1 (Optional) send a notification to the lyo-dev mailing list that the change is ready for review.
  
This example will use the Lyo RIO project as an example.
+
After the change is reviewed and approved, there is nothing more for you to do
  
* Go to RIO GitHub page:  https://github.com/eclipse/lyo.rio
 
* Select the Fork button in the upper right to create a new repository on GitHub under your userid
 
[[Image:Lyo-github-fork.png]]
 
  
This forked repository is the only one you have write access to - the mirror repo you forked it from is read only.
 
  
=== Clone your GitHub repo on your development system ===
+
Older instructions on using GitHub with Lyo can be found [Lyo/LyoGitHub | here ]
This example uses EGit in Eclipse
+
 
+
* Go to the Git Repositories view in Eclipse
+
* Click Clone a Git Repository
+
* Enter the SSH URL for your GitHub repo - example:  ssh://git@github.com/mffiedler/lyo.rio.git
+
[[Image:Lyo-github-clone.png]]
+
* Complete the wizard
+
* Now, add a remote for the mirror repository (the one you forked from).  This allows you to track and pull incoming changes from other contrbutors
+
  * Expand the lyo.rio repository, right click Remotes->Create Remote
+
  * Give it the name '''upstream''' and select Configure fetch (you will never push to this remote, only your remote named origin)
+
  * Enter the URI for the original mirror you forked (as seen above).  This example will use the RIO:  https://github.com/eclipse/lyo.rio.git
+
  * Click Add for a RefSpec.  Pressing space in the Source field should give you the choice '''master [branch]'''.  Select it and click Next and Finish.  Your fetch screen should look similar to this:
+
[[Image:Lyo-github-remote-fetch.png]]
+
  * Click Save (or Save and Fetch)
+
  * To retrieve upstream changes from now on, go to the Git Repositories view.  Expand your repo -> Remotes->'''upstream''.  Right click the entry with the green arrow and Fetch
+
[[Image:Lyo-github-fetch-upstream.png]]
+
  * Now merge the upstream changes into your local repo.  Right click the repository -> Merge.  Expand remotes and select upstream/master
+
[[Image:Lyo-github-merge-upstream.png]]
+
  *  This fetch and merge process is actually much easier from the command line:
+
      * git fetch upstream
+
      * git merge upstream/master
+
 
+
 
+
* At this point, continue on with the [http://wiki.eclipse.org/Lyo/BuildRIO#Build_the_projects directions] to build and run the RIO.
+
 
+
== Contributing a change ==
+
* First, make sure you have a bugzilla open for Product = Lyo at http://bugs.eclipse.org.  You can make a request in the bug or on the [mailto:lyo-dev@eclipse.org mailing list] that it be assigned to you.
+
* Code your change.  Make sure it is your own code.  See [[Development_Resources/Handling_Git_Contributions|Handling Git Contributions]]
+
* Add the following statement to the bugzilla "I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use."
+
* Commit your change locally and then push it to your '''origin''' remote.  See instructions above for pushing. '''origin''' is your forked repository on GitHub
+
  * Your commit message '''must''' include the bugzilla ID and a description of the change
+
* Update the Bugzilla with a link to the commit on GitHub.  e.g.: https://github.com/mffiedler/lyo.rio/commit/689e0e45fb822acd94d5b5ef256e7c581fa555de
+
* Go to the GitHub web interface and click Send Pull Request
+

Revision as of 20:47, 26 April 2012

This guide is to help you get started contributing to the Eclipse Lyo project.

Git repositories

Lyo uses Git for source control. Getting both EGit for Eclipse and the git command line tools are recommended.

The Lyo project's Git repositories.


Gerrit and Lyo

Lyo uses Gerrit to accept, review and approve code contributions from the community. Please see [Gerrit | the Eclipse Gerrit guide ] for information on configuring EGit or the command line to push to the Eclipse Gerrit instance.

Lyo contribution process

You're ready to contribute a bug fix or some new functionality to Lyo? Great. Here's what you need to do:

1 Make sure there is a Bugzilla bug open for the work that you are doing. Make a comment in the bug or on the mailing list that you want it assigned to you. 1 Pull the latest Lyo code from the appropriate Lyo git repository 1 Code your change - make sure you update any copyright headers as needed. 1 Commit your change locally - all commits must include the Bugzilla number in the commit message 1 Push the code to the appropriate Lyo Gerrit repository. 1 Visit the Gerrit review instance and login 1 Click on your new review request and add some reviewers

  1 Add at least one of the project committers (fiedler.mf@gmail-dot-com or spadgett@us-dot-ibm-dot-com are good choices) as a reviewer
  1 Add any others you think would be able to provide a valuable review

1 Edit the Bugzilla bug tracking this work and add this statement (only if it is true!!): "I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use." 1 (Optional) send a notification to the lyo-dev mailing list that the change is ready for review.

After the change is reviewed and approved, there is nothing more for you to do


Older instructions on using GitHub with Lyo can be found [Lyo/LyoGitHub | here ]

Back to the top