Skip to content

Latest commit

 

History

History
73 lines (63 loc) · 4.67 KB

CONTRIBUTING.md

File metadata and controls

73 lines (63 loc) · 4.67 KB

Contributing

Want to contribute? Great! First, read this page (including the small print at the end).

Before you contribute

Before we can use your code, you must sign the Google Individual Contributor License Agreement (CLA), which you can do online. The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things—for instance that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on.

Set up your development environment

See Getting Started.

Code reviews

All submissions, including submissions by project members, require review. We use Github pull requests for this purpose.

For Person Finder team members

  1. Make sure that you are a member of the team. Ask @gimite to add you if you are not.
  2. Find an issue to work on, or create a new one, in the issue list.
    • If it is the first time for you to contribute to this project, I recommend you to start from one of the issues marked as low hanging.
  3. Comment on the issue that you will work on the issue (to avoid conflict).
  4. Create a new branch, prefixed with your username.
    $ git checkout -b $USER-your-new-feature
  5. Make changes and commit. Repeat the step until you are ready for code review.
    $ git commit -a
  6. Make sure the unit tests and the server tests pass.
    $ tools/all_tests
  7. Push your local changes to the remote repository.
    $ git push -u origin $USER-your-new-feature
  8. Create a new pull request. If you go to https://github.com/google/personfinder, it should show a button to suggest creating a pull request for your branch. Or, you can install hub commandline tool and run:
    $ hub pull-request -i <issue #>
    (-i is optional, but strongly encouraged.)
  9. The pull request will be reviewed by one of the code reviewers (*) and merged to the master branch after addressing reviewer's comments. (@gimite as of 2016/8).

For non-team members

  1. Find an issue to work on, or create a new one, in the issue list.
    • If it is the first time for you to contribute to this project, I recommend you to start from one of the issues marked as low hanging.
  2. Comment on the issue that you will work on the issue (to avoid conflict).
  3. Fork google/personfinder project on Github.
  4. Make changes and push to your fork. Repeat the step until you are ready for code review.
    $ git commit -a
    $ git push -u origin $YOUR_BRANCH
  5. Make sure the unit tests and the server tests pass.
  6. Create a new pull request.
  7. The pull request will be reviewed by one of the code reviewers (*) and merged to the master branch after addressing reviewer's comments. (@gimite as of 2016/8).

For code reviewers

  1. Assign yourself as a reviewer of the pull request if it doesn't have one.
  2. Review the code and leave comments. Check that it follows Google Python Style Guide and/or the Google JavaScript Style Guide (except the parts related to the Closure compiler, which we don't use).
  3. Approve the pull request once you are happy.
  4. Confirm that all system checks have passed. If CLA check is failing, point the author to this page and ask them to sign CLA.
  5. Choose and click [Squash and merge] to pull the change. That's the best option to keep the Git commit tree clean.

The small print

Contributions made by corporations are covered by a different agreement than the one above, the Software Grant and Corporate Contributor License Agreement.