You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 2.9 kB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # How to contribute
  2. We definitely welcome your patches and contributions to gRPC!
  3. If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/)
  4. ## Legal requirements
  5. In order to protect both you and ourselves, you will need to sign the
  6. [Contributor License Agreement](https://identity.linuxfoundation.org/projects/cncf).
  7. ## Guidelines for Pull Requests
  8. How to get your contributions merged smoothly and quickly.
  9. - Create **small PRs** that are narrowly focused on **addressing a single
  10. concern**. We often times receive PRs that are trying to fix several things at
  11. a time, but only one fix is considered acceptable, nothing gets merged and
  12. both author's & review's time is wasted. Create more PRs to address different
  13. concerns and everyone will be happy.
  14. - The grpc package should only depend on standard Go packages and a small number
  15. of exceptions. If your contribution introduces new dependencies which are NOT
  16. in the [list](https://godoc.org/google.golang.org/grpc?imports), you need a
  17. discussion with gRPC-Go authors and consultants.
  18. - For speculative changes, consider opening an issue and discussing it first. If
  19. you are suggesting a behavioral or API change, consider starting with a [gRFC
  20. proposal](https://github.com/grpc/proposal).
  21. - Provide a good **PR description** as a record of **what** change is being made
  22. and **why** it was made. Link to a github issue if it exists.
  23. - Don't fix code style and formatting unless you are already changing that line
  24. to address an issue. PRs with irrelevant changes won't be merged. If you do
  25. want to fix formatting or style, do that in a separate PR.
  26. - Unless your PR is trivial, you should expect there will be reviewer comments
  27. that you'll need to address before merging. We expect you to be reasonably
  28. responsive to those comments, otherwise the PR will be closed after 2-3 weeks
  29. of inactivity.
  30. - Maintain **clean commit history** and use **meaningful commit messages**. PRs
  31. with messy commit history are difficult to review and won't be merged. Use
  32. `rebase -i upstream/master` to curate your commit history and/or to bring in
  33. latest changes from master (but avoid rebasing in the middle of a code
  34. review).
  35. - Keep your PR up to date with upstream/master (if there are merge conflicts, we
  36. can't really merge your change).
  37. - **All tests need to be passing** before your change can be merged. We
  38. recommend you **run tests locally** before creating your PR to catch breakages
  39. early on.
  40. - `make all` to test everything, OR
  41. - `make vet` to catch vet errors
  42. - `make test` to run the tests
  43. - `make testrace` to run tests in race mode
  44. - optional `make testappengine` to run tests with appengine
  45. - Exceptions to the rules can be made if there's a compelling reason for doing so.