How to Contribute updates

Summary:
Rename "Testing" guide. Add docs for several new GitHub bot commands. Format commands table.

Built website and verified everything looks good.
Closes https://github.com/facebook/react-native/pull/15111

Differential Revision: D5458660

Pulled By: hramos

fbshipit-source-id: 151ea0cbd18489bc527193682464ca291d6ab467
This commit is contained in:
Hector Ramos
2017-07-20 09:15:05 -07:00
parent d4e6bcd9cd
commit d41957d7e5
5 changed files with 336 additions and 105 deletions
+112 -32
View File
@@ -1,44 +1,124 @@
Please read the following carefully. Issues that do not follow these guidelines will be closed.
<!--
PLEASE DON'T DELETE THIS TEMPLATE UNTIL YOU HAVE READ THE FIRST SECTION.
-->
We use GitHub Issues exclusively for tracking bugs in React Native.
### Is this a bug report?
- 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
(write your answer here)
## Reporting Bugs
<!--
If you answered "Yes":
Report a single bug per issue.
We expect that it will take you about 30 minutes to produce a high-quality bug report.
While this may seem like a lot, putting care into issues helps us fix them faster.
For bug reports, it is REQUIRED to fill the rest of this template, or the issue will be closed.
### Reproducing bugs
If you answered "No":
- 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.
We use GitHub Issues exclusively for tracking bugs in React Native. If you're looking for help,
check out the How to Get In Touch section of the following guide:
https://facebook.github.io/react-native/docs/contributing.html#how-to-get-in-touch
Issues that do not describe a bug or do not follow the template will be closed.
--- Delete everything above this line ---
### Description
Explain what you did, what you expected to happen, and what actually happens.
### Reproduction Steps and Sample Code
List all the steps required to reproduce the issue you're reporting. These steps should be clear and concise.
***An example of your code or a repro using Snack is REQUIRED***
Now scroll below!
-->
### Solution
### Have you read the Bugs section of the How to Contribute guide?
What needs to be done to address this issue? Ideally, provide a pull request with a fix.
(Write your answer here.)
### Additional Information
<!--
Please read through the bug reporting guidelines thoroughly:
https://facebook.github.io/react-native/docs/contributing.html#bugs
-->
* 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]
### Environment
<!--
Please fill in all the relevant fields by running these commands in terminal.
-->
1. `react-native -v`:
2. `node -v`:
3. `npm -v`:
4. `yarn --version`<!-- (if you use Yarn) -->:
Then, specify:
<!-- (What platform are you building for? Choose any from iOS, Android, AppleTV.) -->
- Target Platform:
<!-- Which operating system are you using? Specify macOS, Windows, or Linux, along with specific release versions -->
- Development Operating System:
<!-- Include any additional relevant information. Are you using Xcode or Android Studio to build native code? Is the issue specific to a particular iOS or Android SDK? -->
- Build tools:
### Steps to Reproduce
<!--
How would you describe your issue to someone who doesnt know you or your project?
Try to write a sequence of steps that anybody can repeat to see the issue.
Be specific! If the bug cannot be reproduced, your issue may be closed.
-->
(Write your steps here:)
1.
2.
3.
### Expected Behavior
<!--
How did you expect your project to behave?
Its fine if youre not sure your understanding is correct.
Just write down what you thought would happen.
-->
(Write what you thought would happen.)
### Actual Behavior
<!--
Did something go wrong?
Is something broken, or not behaving as you expected?
Describe this section in detail, and attach screenshots if possible.
Don't just say "it doesn't work"!
-->
(Write what happened. Add screenshots!)
### Reproducible Demo
<!--
Please share a project that reproduces the issue.
There are two ways to do it:
* Create a new app using https://snack.expo.io/ and try to reproduce the issue in it.
This is useful if you roughly know where the problem is, or cant share the real code.
* Or, copy your app and remove things until youre left with the minimal reproducible demo.
This is useful for finding the root cause. You may then optionally create a Snack.
This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve
Once youre done, copy and paste the link to the Snack or a public GitHub repository below:
-->
(Paste the link to an example project and exact instructions to reproduce the issue.)
<!--
What happens if you skip this step?
Someone will read your bug report, and maybe will be able to help you,
but its unlikely that it will get much attention from the team. Eventually,
the issue will likely get closed in favor of issues that have reproducible demos.
Please remember that:
* Issues without reproducible demos have a very low priority.
* The person fixing the bug would have to do that anyway. Please be respectful of their time.
* You might figure out the issues yourself as you work on extracting it.
Thanks for helping us help you!
-->
+2 -3
View File
@@ -55,12 +55,11 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad
### Contributing Guide
Read our [contributing guide](CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React Native.
Read our [contributing guide](https://facebook.github.io/react-native/docs/contributing.html) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes to React Native.
### Beginner Friendly Bugs
We have a list of [beginner friendly bugs](https://github.com/facebook/react-native/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Task%22) to help you get your feet wet in the React Native codebase and familiar with our contribution process. This is a great place to get started.
We have a list of [beginner friendly issues](https://github.com/facebook/react-native/labels/Good%20First%20Task) to help you get your feet wet in the React Native codebase and familiar with our contribution process. This is a great place to get started.
## License
+26 -10
View File
@@ -1,19 +1,19 @@
React Native GitHub Issue Task Force: AndrewJack, astreet, bestander, brentvatne, browniefed, cancan101, charpeni, chirag04, christopherdro, corbt, cosmith, damusnet, DanielMSchmidt, davidaurelio, dmmiller, dsibiski, foghina, frantic, geirman, grabbou, gre, ide, janicduplessis, javache, jaygarcia, jsierles, kmagiera, knowbody, kmagiera, Kureev, lelandrichardson, martinbigio, melihmucuk, mkonicek, ncuillery, rmevans9, rt2zz, ryankask, satya164, skevy, vjeux
React Native GitHub Issue Task Force: AndrewJack, astreet, bestander, brentvatne, browniefed, cancan101, charpeni, chirag04, christopherdro, corbt, cosmith, damusnet, DanielMSchmidt, davidaurelio, dmmiller, dsibiski, foghina, frantic, gantman, geirman, grabbou, gre, ide, janicduplessis, javache, jaygarcia, jsierles, kmagiera, knowbody, kmagiera, Kureev, lelandrichardson, martinbigio, melihmucuk, mkonicek, ncuillery, rmevans9, rt2zz, ryankask, satya164, skevy, tabrindle, vjeux
@facebook-github-bot answered
comment Closing this issue as {author} says the question asked has been answered. Please help us by asking questions on [StackOverflow](http://stackoverflow.com/questions/tagged/react-native). StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.
comment Closing this issue as {author} says the question asked has been answered.
close
@facebook-github-bot duplicate (#[0-9]+)
comment {author} tells me this issue is a duplicate of {match0}. Let's discuss there, closing this one.
comment Duplicate of {match0}
close
@facebook-github-bot expected
comment The comment above tells me this is expected behavior. Closing this as we'd like to use the GitHub issue tracker for bugs. If you'd like to change how this feature works please post a feature request on [Canny](https://react-native.canny.io/feature-requests) so that other people can vote on it.
comment The comment above tells me this is expected behavior. If you'd like to change how this feature works, please submit a feature request on [Canny](https://react-native.canny.io/feature-requests) so that other people can vote on it.
close
@facebook-github-bot stack-overflow
comment Hey {issue_author} and thanks for posting this! {author} tells me this issue looks like a question that would be best asked on [StackOverflow](http://stackoverflow.com/questions/tagged/react-native). StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.
comment Hey {issue_author}, thanks for posting this! {author} tells me this issue looks like a question that would be best asked on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native). Stack Overflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.
add-label For Stack Overflow
close
@@ -21,28 +21,44 @@ close
add-label {match0}
@facebook-github-bot no-reply
comment Closing this issue as more information is needed to debug this and we haven't heard back from the author. Once there's more information we can reopen the issue.
comment Closing this issue as more information is needed to debug this and we haven't heard back from the author.
add-label Needs Response from Author
close
@facebook-github-bot no-template
comment Hey, thanks for reporting this issue! It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the [Issue Template](https://raw.githubusercontent.com/facebook/react-native/master/.github/ISSUE_TEMPLATE.md)? This is necessary for people to be able to understand and reproduce the issue being reported. I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!
add-label Needs more information
close
@facebook-github-bot close
comment {author} tells me to close this issue. If you think it should still be opened let us know why.
comment {author} has closed this issue. If you think it should remain open, let us know why.
close
@facebook-github-bot bugfix
comment Hey {issue_author}, we're a small team and rely on the community to fix issues that don't affect fb apps. If you're sure this is a bug can you send a pull request with a fix?
comment Hey {issue_author}, if you're sure this is a bug, can you send a pull request with a fix?
add-label Help Wanted
@facebook-github-bot needs-repro
comment Can you reproduce the issue using [Snack](http://snack.expo.io)? This step is necessary for people to be able to see and debug the issue being reported.
add-label Needs more information
@facebook-github-bot cannot-repro
comment Thanks for opening the issue! It does not appear like a community member will be able to reliably reproduce this issue. This may be for several reasons; perhaps it affects a particular app but a minimal repro has not been provided, or the issue may be sporadic. As it happens, we need a concrete set of steps that can demonstrably reproduce the issue as this will allow your fellow community members to validate a fix. We'll close the issue for now, but feel free to submit a new issue once you're able to reliably reproduce the issue locally. Thanks for your understanding!
close
@facebook-github-bot reopen
comment Okay, reopening this issue.
reopen
@facebook-github-bot feature
comment Hey {issue_author}! Thanks for opening the issue, however it looks like a feature request. As noted in the [Issue template](https://github.com/facebook/react-native/blob/master/.github/ISSUE_TEMPLATE.md) we'd like to use the GitHub issues to track bugs only. Can you implement the feature as a standalone npm module? If not consider sending a pull request or a create an entry on [Canny](https://react-native.canny.io/feature-requests/). It has a voting system and if the feature gets upvoted enough it might get implemented. Closing this now, thanks for understanding!
comment Hey {issue_author}! Thanks for opening the issue, however it looks like a feature request. As noted in the [Issue template](https://raw.githubusercontent.com/facebook/react-native/master/.github/ISSUE_TEMPLATE.md) we'd like to use the GitHub issues to track bugs only. Can you implement the feature as a standalone npm module? If not, consider sending a pull request or a creating an entry on [Canny](https://react-native.canny.io/feature-requests/). It has a voting system and if the feature gets upvoted enough it might get implemented. Closing this now, thanks for understanding!
add-label Feature Request
close
@facebook-github-bot cla
comment Hey {issue_author}! Thanks for sending this pull request! We would love to review your changes however it looks like you haven't signed the CLA yet. You can do so at https://code.facebook.com/cla.
@facebook-github-bot icebox
comment {author} tells me to close this issue because it has been inactive for a while. If you think it should still be opened let us know why.
comment {author} tells me to close this issue because it has been inactive for a while. It's possible that the bug has been fixed since this issue was originally submitted, or perhaps it is not affecting a great amount of people, or a workaround has been provided. Either way, we're going to close this in order to allow the community to focus on more pressing issues. If you strongly believe this issue should remain open, please let us know why.
add-label Icebox
close
+185 -56
View File
@@ -10,7 +10,17 @@ previous: upgrading
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 using Facebook's mobile apps. 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.
## Code of Conduct
- [Code of Conduct](docs/contributing.html#code-of-conduct)
- [Development Process](docs/contributing.html#our-development-process)
- [Branch Organization](docs/contributing.html#branch-organization)
- [How to Get in Touch](docs/contributing.html#how-to-get-in-touch)
- [Bugs](docs/contributing.html#bugs)
- [Pull Requests](docs/contributing.html#pull-requests)
- [Triaging Issues and Pull Requests](docs/contributing.html#triaging-issues-and-pull-requests)
- [Style Guide](docs/contributing.html#style-guide)
- [License](docs/contributing.html#license)
## [Code of Conduct](https://code.facebook.com/codeofconduct)
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
@@ -24,6 +34,17 @@ We will do our best to keep `master` in good shape, with tests passing at all ti
To see what changes are coming and provide better feedback to React Native contributors, use the [latest release candidate](http://facebook.github.io/react-native/versions.html) when possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
## How to Get in Touch
Many React Native users are active on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native). If you 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. There is also [an active community of React and React Native users on the Discord chat platform](https://discord.gg/0ZcbPKXt5bZjGY5n) in case you need help.
The React Native team sends out periodical updates through the following channels:
* [React Native Blog](https://facebook.github.io/react-native/blog/)
* [@ReactNative on Twitter](https://www.twitter.com/reactnative)
Core contributors to React Native meet monthly and post their meeting notes on the React Native blog. You can also find ad hoc discussions in the [React Native Core Contributors](https://www.facebook.com/groups/reactnativeoss/) Facebook group.
## Bugs
### Where to Find Known Issues
@@ -38,62 +59,19 @@ Questions and feature requests are tracked elsewhere:
### Reporting New Issues
The best way to get your bug fixed is to provide a reduced test case. Please provide either a [Snack](https://snack.expo.io/) or a public repository with a runnable example.
When [opening a new issue](https://github.com/facebook/react-native/issues/new), always make sure to fill out the [issue template](https://raw.githubusercontent.com/facebook/react-native/master/.github/ISSUE_TEMPLATE.md). **This step is very important!** Not doing so may result in your issue getting closed. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
Please report a single bug per issue. Always provide reproduction steps. You can use [Snack](https://snack.expo.io/) in many cases to demonstrate an issue. 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.
- **One issue, one bug:** Please report a single bug per issue.
- **Provide a Snack:** The best way to get attention on your issue is to provide a reduced test case. You can use [Snack](https://snack.expo.io/) to demonstrate the issue.
- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. Provide a Snack or upload a sample project to GitHub. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort.
- **Try out the latest version:** Verify that the issue can be reproduced locally by updating your project to use [React Native from `master`](http://facebook.github.io/react-native/versions.html). The bug may have already been fixed!
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 the [list of versions](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.
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).
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) or reaching out to the community through [other channels](docs/contributing.html#how-to-get-in-touch).
### 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.
## Triaging issues and pull requests
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in. Ask for more information if the issue does not provide all the details required by the template. Suggest [labels](https://github.com/facebook/react-native/labels). Flag issues that are stale or that should be closed. Ask for test plans and review code.
Adding labels, closing and reopening issues, and merging pull requests is, as you may expect, limited to a subset of contributors. Simply commenting on the issue or pull request can still go a long way towards helping us keep the number of outstanding issues under control.
### Using the Facebook GitHub Bot
The Facebook GitHub Bot allows certain active members of the community to perform administrative actions such as labeling and closing issues. The list of community members with this kind of access can be found at the top of [`IssueCommands.txt`](https://github.com/facebook/react-native/blob/master/bots/IssueCommands.txt). The bot can be triggered by adding any of the following commands as a standalone comment on an issue:
- `@facebook-github-bot close`: **Closes** an issue without providing a particular explanation.
- `@facebook-github-bot label (.*)`: Use this command to add a [label](https://github.com/facebook/react-native/labels), such as "iOS" or "Android", to an issue.
- `@facebook-github-bot duplicate (#[0-9]+)`: Marks an issue as a duplicate. Requires a issue number to be provided. The bot will **close** the issue.
- `@facebook-github-bot stack-overflow`: Mark issues that do not belong in the bug tracker, and redirect to Stack Overflow. The bot will **close** the issue after adding the _For Stack Overflow_ label.
- `@facebook-github-bot feature`: Use this when an issue describes a feature request, as opposed to a reproducible bug. The bot will point the author to the feature request tracker, add the _Feature Request_ label, then **close** the issue.
- `@facebook-github-bot expected`: Use this when an issue describes a type of expected behavior. The bot will **close** the issue.
- `@facebook-github-bot answered`: Use this when an issue appears to be a question that has already been answered by someone on the thread. The bot will **close** the issue.
- `@facebook-github-bot no-reply`: Use this when an issue requires more information from the author but they have not added a comment in over two weeks. The bot will **close** the issue.
- `@facebook-github-bot reopen`: **Re-opens** a previously closed issue.
- `@facebook-github-bot bugfix`: Mark issues that describe a reproducible bug. The bot will prompt the author to submit a pull request with a fix.
- `@facebook-github-bot icebox`: Use this when an issue has been open for over 30 days with no activity. The bot will **close** the issue after adding the _Icebox_ label.
Additionally, the following commands can be used on a pull request:
- `@facebook-github-bot cla`: Remind the author that the CLA needs to be signed.
- `@facebook-github-bot shipit`: Flag the PR for merging. If used by a core contributor, the bot will attempt to import the pull request. In general, core contributors are those who have consistently submitted high quality contributions to the project.
## How to Get in Touch
Many React Native users are active on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native). If you 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. There is also [an active community of React and React Native users on the Discord chat platform](https://discord.gg/0ZcbPKXt5bZjGY5n) in case you need help.
The React Native team sends out periodical updates through the following channels:
* [React Native Blog](https://facebook.github.io/react-native/blog/)
* [@ReactNative on Twitter](https://www.twitter.com/reactnative)
Core contributors to React Native meet monthly and post their meeting notes on the React Native blog. You can also find ad hoc discussions in the [React Native Core Contributors](https://www.facebook.com/groups/reactnativeoss/) Facebook group.
## Proposing a Change
If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/facebook/react-native/issues/new). This lets us reach an agreement on your proposal before you put significant effort into it.
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
## Pull Requests
### Your First Pull Request
@@ -102,7 +80,7 @@ Working on your first Pull Request? You can learn how from this free video serie
[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
To help you get your feet wet and get you familiar with our contribution process, we have a list of [beginner friendly issues](https://github.com/facebook/react-native/labels/Good%20First%20Task) that contain bugs which are fairly easy to fix. This is a great place to get started.
We have a list of [beginner friendly issues](https://github.com/facebook/react-native/labels/Good%20First%20Task) to help you get your feet wet in the React Native codebase and familiar with our contribution process. This is a great place to get started.
If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don't accidentally duplicate your effort.
@@ -122,7 +100,7 @@ Small pull requests are much easier to review and more likely to get merged. Mak
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 both Travis and Circle CI.
5. Make sure your code lints (`node linter.js <files touched>`).
5. Make sure your code lints (`npm run lint`).
6. If you haven't already, [sign the CLA](https://code.facebook.com/cla).
> **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.
@@ -133,10 +111,9 @@ A good test plan has the exact commands you ran and their output, provides scree
- 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`)
- If you've updated the docs, verify the website locally and submit screenshots if applicable (see [website/README.md](https://github.com/facebook/react-native/blob/master/website/README.md))
See "What is a Test Plan?" to learn more:
https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
See [What is a Test Plan?](https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9) to learn more.
#### Continuous integration tests
@@ -185,9 +162,161 @@ In order to accept your pull request, we need you to submit a CLA. You only need
Complete your CLA here: https://code.facebook.com/cla
### Proposing a change
If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/facebook/react-native/issues/new). This lets us reach an agreement on your proposal before you put significant effort into it.
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
## Triaging Issues and Pull Requests
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in. Ask for more information if the issue does not provide all the details required by the template. Suggest [labels](https://github.com/facebook/react-native/labels). Flag issues that are stale or that should be closed. Ask for test plans and review code.
Adding labels, closing and reopening issues, and merging pull requests is, as you may expect, limited to a subset of contributors. Simply commenting on the issue or pull request can still go a long way towards helping us keep the number of outstanding issues under control.
### Using the Facebook GitHub Bot
The Facebook GitHub Bot allows certain active members of the community to perform administrative actions such as labeling and closing issues. The list of community members with this kind of access can be found at the top of [IssueCommands.txt](https://github.com/facebook/react-native/blob/master/bots/IssueCommands.txt). The bot can be triggered by adding any of the following commands as a standalone comment on an issue:
<div class="props">
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> no-template
</h4>
<div><p>
Use this when more information is needed, especially if the issue does not adhere to the <a href="https://raw.githubusercontent.com/facebook/react-native/master/.github/ISSUE_TEMPLATE.md">issue template</a>. The bot will <strong>close</strong> the issue after adding the "Needs more information" label.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> stack-overflow
</h4>
<div><p>
Mark issues that do not belong in the bug tracker, and redirect to Stack Overflow. The bot will <strong>close</strong> the issue after adding the "For Stack Overflow" label.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> needs-repro
</h4>
<div><p>
Prompts the author to provide a reproducible example or <a href="http://snack.expo.io">Snack</a>. The bot will apply the "Needs more information" label.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> cannot-repro
</h4>
<div><p>
Use this when the issue cannot be reproduced, either because it affects a particular app but no minimal repro was provided, or the issue describes something sporadic that is unlikely to be reproduced by a community member. The bot will <strong>close</strong> the issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> duplicate <span class="methodType">(#[0-9]+)</span>
</h4>
<div><p>
Marks an issue as a duplicate. Requires a issue number to be provided. The bot will <strong>close</strong> the issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> label <span class="methodType">(.*)</span>
</h4>
<div><p>
Use this command to add a <a href="https://github.com/facebook/react-native/labels">label</a>, such as "iOS" or "Android", to an issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> feature
</h4>
<div><p>
Use this when an issue describes a feature request, as opposed to a reproducible bug. The bot will point the author to the feature request tracker, add the "Feature Request" label, then <strong>close</strong> the issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> expected
</h4>
<div><p>
Use this when an issue describes a type of expected behavior. The bot will <strong>close</strong> the issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> answered
</h4>
<div><p>
Use this when an issue appears to be a question that has already been answered by someone on the thread. The bot will <strong>close</strong> the issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> close
</h4>
<div><p>
<strong>Closes</strong> an issue without providing a particular explanation.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> reopen
</h4>
<div><p>
<strong>Re-opens</strong> a previously closed issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> bugfix
</h4>
<div><p>
Mark issues that describe a reproducible bug and encourage the author to send a pull request. The bot will add the "Help Wanted" label.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> no-reply
</h4>
<div><p>
Use this when an issue requires more information from the author but they have not added a comment in a while. The bot will <strong>close</strong> the issue.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> icebox
</h4>
<div><p>
Use this when an issue has been open for over 30 days with no activity and no community member has volunteered to work on a fix. The bot will <strong>close</strong> the issue after adding the "Icebox" label.
</p></div>
</div>
</div>
Additionally, the following commands can be used on a pull request:
<div class="props">
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> cla
</h4>
<div><p>
Remind the author that the CLA needs to be signed.
</p></div>
</div>
<div class="prop">
<h4 class="methodTitle">
<span class="methodType">@facebook-github-bot</span> shipit
</h4>
<div><p>
Flag the PR for merging. If used by a core contributor, the bot will attempt to import the pull request. In general, core contributors are those who have consistently submitted high quality contributions to the project.
</p></div>
</div>
</div>
## Style Guide
Our linter will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `node linter.js <files touched>`.
Our linter will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `npm run lint`.
However, there are still some styles that the linter cannot pick up.
+11 -4
View File
@@ -1,6 +1,6 @@
---
id: testing
title: Running Tests and Contributing
title: Testing your Changes
layout: docs
category: Guides
permalink: docs/testing.html
@@ -8,13 +8,20 @@ next: understanding-cli
previous: contributing
---
This document is about running tests on React Native itself. If you're interested in testing a React Native app, check out the [React Native Tutorial](http://facebook.github.io/jest/docs/tutorial-react-native.html) on the Jest website.
This document is about testing your changes to React Native as a [contributor](docs/contributing.html). If you're interested in testing a React Native app, check out the [React Native Tutorial](http://facebook.github.io/jest/docs/tutorial-react-native.html) on the Jest website.
The React Native repo has several tests you can run to verify you haven't caused a regression with your PR. These tests are run with the [Travis](https://travis-ci.org/facebook/react-native/builds) and [CircleCI](https://circleci.com/gh/facebook/react-native) continuous integration systems, which will automatically annotate pull requests with the test results.
The React Native repo has several tests you can run to verify you haven't caused a regression with your PR. These tests are run with the [Travis](https://travis-ci.org/facebook/react-native/builds) and [Circle](https://circleci.com/gh/facebook/react-native) continuous integration systems, which will automatically annotate pull requests with the test results.
Whenever you are fixing a bug or adding new functionality to React Native, you should add a test that covers it. Depending on the change you're making, there are different types of tests that may be appropriate.
## JavaScript Tests
- [JavaScript](docs/testing.html#javascript)
- [Android](docs/testing.html#android)
- [iOS](docs/testing.html#ios)
- [Apple TV](docs/testing.html#apple-tv)
- [End-to-end tests](docs/testing.html#end-to-end-tests)
- [Website](docs/testing.html#website)
## JavaScript
### Jest