I'm really glad you're reading this, because contributions are very welcome. This is my first React-Native app so any recommended improvements are appreciated. Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved!
We currently use the Issue Tracker to track and discuss bugs, features, and any other topics related to the project.
Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
IMPORTANT: By submitting a patch, you agree that your work will be licensed under the license used by the project.
If you have any large pull request in mind (e.g. implementing features, refactoring code, etc), please ask first otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
Please adhere to the coding conventions in the project (indentation, accurate comments, etc.) and don't forget to add your own tests and documentation. When working with git, we recommend the following process in order to craft an excellent pull request:
-
Fork the project, clone your fork, and configure the remotes:
# Clone your fork of the repo into the current directory git clone https://github.com/<your-username>/metroAppIOS # Navigate to the newly cloned directory cd metroAppIOS # Assign the original repo to a remote called "upstream" git remote add upstream https://github.com/axelclark/metroAppIOS
-
Verify project runs on your machine.
yarn install yarn start
-
If you cloned a while ago, get the latest changes from upstream, and update your fork:
git checkout master git pull upstream master git push
-
Create a new topic branch (off of
master
) to contain your feature, change, or fix.IMPORTANT: Making changes in
master
is discouraged. You should always keep your localmaster
in sync with upstreammaster
and make your changes in topic branches.git checkout -b <topic-branch-name>
-
When feature is complete and tests pass, stage the changes.
git add --all
-
When you've staged the changes, commit them.
git status git commit --verbose
-
Write a [good commit message]. Example format:
Present-tense summary under 50 characters * More information about commit (under 72 characters). * More information about commit (under 72 characters). * Closes #XX
-
If you've created more than one commit, use
git rebase
interactively to squash them into cohesive commits with good messages:git rebase -i origin/master
-
Make sure all the tests are still passing. See additional info in the Testing section below.
yarn test
-
Push your topic branch up to your fork:
git push origin <topic-branch-name>
-
Open a Pull Request with a clear title and description. Ebert will do an automated Code Review, see Code Conventions below.
-
If you haven't updated your pull request for a while, you should consider rebasing on master and resolving any conflicts.
IMPORTANT: Never ever merge upstream
master
into your branches. You should alwaysgit rebase
onmaster
to bring your changes up to date when necessary. See below.git checkout master git pull upstream master git checkout <your-topic-branch> git rebase master
We use Ebert to automate code reviews for each pull request. Once you submit your pull request, Ebert will review and provide comments based on the project's ESLint config. The project uses Air BNB's ESLint Config with some minor modifications. The review will pass if no additional issues are created with your pull request. Fixing existing issues in files you edit is greatly appreciated!
We're working on adding tests for the project. When a pull request is submitted, Travis CI is used to run the test suite. If your code breaks any of the tests, please fix the issue and push your branch again. If the snapshot test is failing because you added a feature, run yarn test -u
to update the snapshot. See Snapshot Testing for more info.
Thanks, Axel