Skip to content

Latest commit

 

History

History
113 lines (72 loc) · 4.62 KB

File metadata and controls

113 lines (72 loc) · 4.62 KB

How to contribute

Before you begin

Sign our Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.

If you or your current employer have already signed the Google CLA (even if it was for a different project), you probably don't need to do it again.

Visit https://cla.developers.google.com/ to see your current agreements or to sign a new one.

Review our community guidelines

This project follows Google's Open Source Community Guidelines.

Contribution process

1. Things you will need

2. Forking & cloning the repository

  • Ensure all the dependencies described in the README are installed.
  • Fork https://github.com/googlemaps/react-native-driver-sdk into your own GitHub account. If you already have a fork, and are now installing a development environment on a new machine, make sure you've updated your fork.
  • If you haven't configured your machine with an SSH key that's known to github, then follow GitHub's directions to generate an SSH key.
  • git clone git@github.com:<your_name_here>/googlemaps/react-native-driver-sdk
  • git remote add upstream git@github.com:googlemaps/react-native-driver-sdk (So that you fetch from the master repository, not your clone, when running git fetch et al.)

3. Updating the library

There are several ways to update the library and test your changes locally. The easiest approach is to modify the codes directly from node_modules folder so that any changes can be tested with the sample app right away. Simply open the project directory of the sample app under ios/android.

iOS

To do this for iOS, open the workspace file and this will give you access to library.

iosWorkspace

Android

To do this for Android, open the Android project directly like you would normally open an Android project

androidProject

Javascript

To update the Javascript codes, edit the library files inside node_modules

rnProject

Testing

Simply run the sample app to test your changes.

Code reviews

All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

Please peruse the Typescript style guide, Java style guide, and Objective-C style guide before working on anything non-trivial. These guidelines are intended to keep the code consistent and avoid common pitfalls.

Create branch

  1. git fetch upstream
  2. git checkout upstream/master -b <name_of_your_branch>
  3. Start coding!

Commit changes

  1. This project uses lefthook to ensure tests pass before committing. Please configure your environment paths to include the Go binary path for addlicense and the Node binary path for npx in the ~/.lefthookrc file. For more information, refer to the lefthook documentation.

  2. git commit -a -m "<your informative commit message>"

    Please make sure all your check-ins have detailed commit messages explaining the patch. When naming the title of your pull request, please follow the Conventional Commits guide. For example, for a fix to the Driver library:

    fix: fixed a bug!

  3. git push origin <name_of_your_branch>

Create pull request

  1. git pull-request (if you are using Hub) or go to https://github.com/googlemaps/react-native-driver-sdk and click the "Compare & pull request" button