Permalink
Browse files

Update guidelines.

Summary:
Consolidate tips on CONTRIBUTING.md, and reduce the wall of text when opening a new issue. Hoping this will encourage more people to read through the text.
Closes #14518

Differential Revision: D5250443

Pulled By: hramos

fbshipit-source-id: 91213c4ceca12225d9f54d1e1e81e020c6e463b3
  • Loading branch information...
hramos authored and facebook-github-bot committed Jun 14, 2017
1 parent 879edf0 commit 0d3b7fe472b26afde2241671de31c67993329142
Showing with 80 additions and 74 deletions.
  1. +14 −22 .github/ISSUE_TEMPLATE.md
  2. +11 −25 .github/PULL_REQUEST_TEMPLATE.md
  3. +54 −23 CONTRIBUTING.md
  4. +1 −4 website/README.md
View
@@ -1,36 +1,28 @@
Please read the following carefully. Issues that do not follow these guidelines will be closed.
<details>
**Issues that do not describe a bug or do not fill out the template below will be closed**
We use GitHub Issues exclusively for tracking bugs in React Native.
We use GitHub Issues exclusively for tracking bugs in React Native.
- Have a question? Ask on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native
- Have a feature request? Submit it here: https://react-native.canny.io/feature-requests
- Want to know more about future plans? Check out the roadmap: https://github.com/facebook/react-native/wiki/Roadmap
- If you're looking for help with your code, consider asking on Stack Overflow instead: http://stackoverflow.com/questions/tagged/react-native
- Want to know more about future plans? Check out the roadmap: https://github.com/facebook/react-native/wiki/Roadmap
- Have a feature request that is not covered in the roadmap? Submit it here: https://react-native.canny.io/feature-requests
## Reporting Bugs
## Reporting bugs
Report a single bug per issue.
### Reproducing bugs
- Always provide reproduction steps.
- Use Snack. Try to reproduce your bug on https://snack.expo.io/ first of all.
If the bug cannot be reproduced using Snack, verify that the issue can be reproduced locally by targeting the latest release candidate. Ideally, check if the issue is present in master as well.
- Do not forget to include sample code that reproduces the issue.
Issues that do not describe a bug or do not follow the template will be closed.
--- Delete everything above this line ---
Want to **report a bug**? Please read the bug reporting guidelines: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#bugs
</details>
### Description
Explain what you did, what you expected to happen, and what actually happens.
### Reproduction Steps and Sample Code
### Reproduction Steps
List all the steps required to reproduce the issue you're reporting. These steps should be clear and concise.
List all the steps required to reproduce the issue you're reporting. These steps should be clear and concise. Always include a sample of your code.
***An example of your code or a repro using Snack is REQUIRED***
#### Sample Code
An example of your code or a reproduction of the problem using Snack is **REQUIRED**.
### Solution
@@ -41,4 +33,4 @@ What needs to be done to address this issue? Ideally, provide a pull request wit
* React Native version: [FILL THIS OUT: Be specific, filling out "latest" here is not enough.]
* Platform: [FILL THIS OUT: iOS, Android, or both?]
* Development Operating System: [FILL THIS OUT: Are you developing on macOS, Linux, or Windows?]
* Dev tools: [FILL THIS OUT: Xcode or Android Studio version, iOS or Android SDK version, if applicable]
* Build tools: [FILL THIS OUT: Xcode or Android Studio version, iOS or Android SDK version, if applicable]
@@ -1,32 +1,18 @@
Thanks for submitting a PR! Please read these instructions carefully:
<details>
Thanks for submitting a PR! Please read these instructions carefully:
- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.
- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.
Please read the [Contribution Guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md) to learn more about contributing to React Native.
</details>
## Motivation (required)
What existing problem does the pull request solve?
_What existing problem does the pull request solve?_
## Test Plan (required)
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.
If you have added code that should be tested, add tests.
## Next Steps
Sign the [CLA][2], if you haven't already.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.
For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.
[1]: https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
_A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website._
View
@@ -1,6 +1,6 @@
# Contributing to React Native
React Native is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
React Native is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on https://facebook.com. We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
## Our Development Process
@@ -10,35 +10,47 @@ Some of the core team will be working directly on GitHub. These changes will be
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and version appropriately so you can lock into a specific version if need be.
### Pull Requests
## Pull Requests
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
**Please submit your pull request on the `master` branch**. If the fix is critical and should be included in a stable branch please mention it and it will be cherry picked into it by a project maintainer.
*Before* submitting a pull request, please make sure the following is done…
1. Fork the repo and create your branch from `master`.
2. **Describe your test plan in your commit.**
- If you've added code that should be tested, add tests!
- If you've changed APIs, update the documentation.
- If you've updated the docs, verify the website locally and submit screenshots if applicable.
```
$ cd website
$ npm install && npm start
Open the following in your browser: http://localhost:8079/react-native/index.html
```
3. Add the copyright notice to the top of any new files you've added.
4. Ensure tests pass on Travis and Circle CI.
2. Add the copyright notice to the top of any new files you've added.
3. Describe your **test plan** in your commit.
4. Ensure **tests pass** on Travis and Circle CI.
5. Make sure your code lints (`node linter.js <files touched>`).
6. If you haven't already, sign the [CLA](https://code.facebook.com/cla).
6. If you haven't already, sign the CLA: https://code.facebook.com/cla
7. Squash your commits (`git rebase -i`).
One intent alongside one commit makes it clearer for people to review and easier to understand your intention.
> **Note:** It is not necessary to keep clicking `Merge master to your branch` on the PR page. You would want to merge master if there are conflicts or tests are failing. The Facebook-GitHub-Bot ultimately squashes all commits to a single one before merging your PR.
#### Test plan
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website.
- If you've added code that should be tested, add tests!
- If you've changed APIs, update the documentation.
- If you've updated the docs, verify the website locally and submit screenshots if applicable (see `website/README.md`)
See "What is a Test Plan?" to learn more:
https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
#### Continuous integration tests
Make sure all **tests pass** on both [Travis][travis] and [Circle CI][circle]. PRs that break tests are unlikely to be merged.
You can learn more about running tests and contributing to React Native here: https://facebook.github.io/react-native/docs/testing.html
[travis]: https://travis-ci.org/facebook/react-native
[circle]: http://circleci.com/gh/facebook/react-native
#### Copyright Notice for files
Copy and paste this to the top of your new file(s):
@@ -60,25 +72,44 @@ If you've added a new module, add a `@providesModule <moduleName>` at the end of
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.
[Complete your CLA here](https://code.facebook.com/cla)
Complete your CLA here: https://code.facebook.com/cla
## Bugs
### Where to Find Known Issues
We use GitHub Issues exclusively for tracking bugs in React Native. Questions and feature requests are tracked elsewhere:
- Have a question? Ask on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native
- If you have a question regarding future plans, check out the roadmap: https://github.com/facebook/react-native/wiki/Roadmap
- Have a feature request that is not covered in the roadmap? Submit it here: https://react-native.canny.io/feature-requests
### Reporting Bugs
The best way to get your bug fixed is to provide a reduced test case. Please provide either a [Sketch](https://sketch.expo.io/) or a public repository with a runnable example.
We are using GitHub Issues for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist.
Please report a single bug per issue. Always provide reproduction steps. You can use Snack in many cases to demonstrate an issue: https://snack.expo.io/. If the bug cannot be reproduced using Snack, verify that the issue can be reproduced locally by targeting the latest release candidate. Ideally, check if the issue is present in master as well.
### Reporting New Issues
Do not forget to include sample code that reproduces the issue. Only open issues for bugs affecting either the latest stable release, or the current release candidate, or master (see http://facebook.github.io/react-native/versions.html). If it is not clear from your report that the issue can be reproduced in one of these releases, your issue will be closed.
The best way to get your bug fixed is to provide a reduced test case. Please provide either a public repository with a runnable example or a [Sketch](https://sketch.expo.io/).
We're not able to provide support through GitHub Issues. If you're looking for help with your code, consider asking on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native
### Security Bugs
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
## How to Get in Touch
## How to Get Help
Refer to the official [React Native docs](https://facebook.github.io/react-native) to learn more about using React Native. The Getting Started Guide is a good place to start.
Many React Native users are active on Stack Overflow. Browse
[existing questions](http://stackoverflow.com/questions/tagged/react-native), or ask your own technical question.
If you have an open-ended question or you just want to get a general sense of what React Native folks talk about, check out the [React Native Community](https://www.facebook.com/groups/react.native.community) Facebook group. It has thousands of developers and almost all posts get a response.
If you need an answer right away, check out the [#react-native](https://discord.gg/0ZcbPKXt5bZjGY5n) channel. There are usually a number of React Native experts there who can help out or point you to somewhere you might want to look.
The React Native team sends out periodical updates through the following channels:
* [Facebook](https://www.facebook.com/groups/react.native.community/)
* [Blog](https://facebook.github.io/react-native/blog/)
* [Twitter](https://www.twitter.com/reactnative)
## Style Guide
View
@@ -28,7 +28,4 @@ Anytime you change the contents, just refresh the page and it's going to be upda
# Publish the website
```sh
cd website
npm run publish-website
```
The website at https://facebook.github.io/react-native is automatically deployed by our continuous integration infrastructure, specifically CircleCI. This is configured in `circle.yml` in the root of the repository.

0 comments on commit 0d3b7fe

Please sign in to comment.