Browse Source

Remove Gerrit mentions from contribution guide

tags/8.0.0.alpha9
Artur 7 years ago
parent
commit
5b77adc6b7
1 changed files with 2 additions and 72 deletions
  1. 2
    72
      CONTRIBUTING.md

+ 2
- 72
CONTRIBUTING.md View File

@@ -132,78 +132,8 @@ You should receive comments within a week or so; if that does not happen, make s

# Submitting the patches

## Submitting patches to gerrit
## Submitting patches to GitHub

### Register

Vaadin Gerrit requires you to register separately even though you already have a vaadin.com or dev.vaadin.com account. Go to http://dev.vaadin.com/review and click “register” in the top right corner. The code review uses OpenID and the simplest way to register is using a Google account. Click “Sign in with a Google Account” and enter your Google account details.

You need to select a username for your account. This is used for submitting contributions for review so remember it.

### Submit an SSH key

You also need to add the public part of an SSH key, which is used to authenticate you when you are submitting patches.

Before any of your patches can be accepted you need to complete a contribution agreement. You can do that while registering your username by clicking on the "New Contributor Agreement" and following the instructions. You can do this later also, but you won't be able to submit anything before the agreement is completed.

Once you are done, you can verify everything is setup correctly using ssh:

ssh -p 29418 <username>@dev.vaadin.com

If you cannot connect, recheck your user name and ssh key.

### Prepare commit hook for Change-Id

Gerrit tracks changes based on a “Change-Id:” field which must be present in the commit message. To automatically generate a change id you must either copy a Git hook made for this purpose by running this command:

scp -p -P 29418 <username>@dev.vaadin.com:hooks/commit-msg .git/hooks/

or, if you are using EGit, remember to click the Add Change-Id button in the commit dialog before committing.

### Add "gerrit" remote

You also need to add Gerrit as a remote in your git to be able to later push changes for review:

git remote add gerrit ssh://<username>@dev.vaadin.com:29418/vaadin.git

In EGit this is configured when you push the first change for review

### Pushing changes

All contributions should be made to the master branch. The contribution might be included in the current maintenance branch depending on the nature of the patch.

The recommended workflow is to checkout master and then create a separate branch for the ticket based on that

git checkout master ; git checkout -b richtext-race-condition

Then do the actual work as described above and pay attention to a decent commit message.

Gerrit uses a special target “refs/for/<branch>” to which changes should be pushed. Since everything should be pushed through master you should always use refs/for/master.

To push the change for review, use the following command:

git push gerrit HEAD:refs/for/master

To give a "topic" to your change, you can use the format

git push gerrit HEAD:refs/for/master/myfancytopic

or in EGit: Team -> Remote -> Push To Gerrit... and Update the URI if incorrect to be ssh://<username>@dev.vaadin.com:29418/vaadin.git . The branch should be refs/for/master

Pushing the commit should result in a message containing a link to the review change:

[...]
New Changes:
https://dev.vaadin.com/review/1381

Open the change in Gerrit and review it to see that you did not accidentally push something else than you thought. If you want to modify the changes, you made, just do [an "amend" commit](https://www.atlassian.com/git/tutorials/rewriting-history/git-commit--amend/) and push the changes again to Gerrit.

A message about the change is automatically sent to reviewers so there is no need to manually add reviewers in Gerrit.

## Submitting patches to github

For some projects which are only available on Github ([Vaadin Plug-in for Eclipse](http://github.com/vaadin/eclipse-plugin), [Vaadin ContextMenu](https://github.com/vaadin/context-menu)), we prefer Pull Requests. For GitHub projects it would make sense to fork the project to create your pull request based on your fork.
All our projects accept contributions as GitHub pull requests. The first time you create a pull request, you will be asked to electronically sign a contribution agreement.

https://yangsu.github.io/pull-request-tutorial/ has instructions on how to create a pull request.

Contributing to these projects also needs a valid Contributor Agrement. See above Gerrit instructions how to digitally sign the agrement.

Loading…
Cancel
Save