aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md55
1 files changed, 29 insertions, 26 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ad2695a1b..cbc8b02f3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,21 +1,16 @@
-# How to submit a bug report
-
-If you received an error message, please include it and any exceptions.
-
-We commonly need to know what platform you are on:
- * JDK/JRE version (i.e., ```java -version```)
- * Operating system (i.e., ```uname -a```)
-
# How to contribute
-We definitely welcome patches and contributions to grpc! Here are some
-guideline and information about how to do so.
+We definitely welcome your patches and contributions to gRPC!
-## Before getting started
+If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/)
+
+## Legal requirements
In order to protect both you and ourselves, you will need to sign the
[Contributor License Agreement](https://cla.developers.google.com/clas).
+## Code style
+
We follow the [Google Java Style
Guide](https://google-styleguide.googlecode.com/svn/trunk/javaguide.html). Our
build automatically will provide warnings for style issues.
@@ -26,13 +21,7 @@ style configurations are commonly useful. For IntelliJ 14, copy the style to
`~/.IdeaIC14/config/codestyles/`, start IntelliJ, go to File > Settings > Code
Style, and set the Scheme to `GoogleStyle`.
-If planning on making a large change, feel free to [create an issue on
-GitHub](https://github.com/grpc/grpc-java/issues/new), visit the [#grpc IRC
-channel on Freenode](http://webchat.freenode.net/?channels=grpc), or send an
-email to [grpc-io@googlegroups.com](grpc-io@googlegroups.com) to discuss
-beforehand.
-
-## Pull Requests & Commits
+## Maintaining clean commit history
We have few conventions for keeping history clean and making code reviews easier
for reviewers:
@@ -51,16 +40,9 @@ for reviewers:
address it as a separate one or multiple commits with a descriptive commit
message (try avoid using vauge `addressed pr feedback` type of messages).
- Project maintainers are obligated to squash those commits into one
+ Project maintainers are obligated to squash those commits into one when
merging.
-## Proposing changes
-
-Make sure that `./gradlew build` (`gradlew build` on Windows) completes
-successfully without any new warnings. Then create a Pull Request with your
-changes. When the changes are accepted, they will be merged or cherry-picked by
-a gRPC core developer.
-
## Running tests
### Jetty ALPN setup for IntelliJ
@@ -73,3 +55,24 @@ those tests in IDE:
* View -> Tool Windows -> Gradle -> Edit Run Configuration -> Defaults -> JUnit -> Before lauch -> + -> Run Gradle task, enter the task in the build.gradle that sets the javaagent.
Step 1 must be taken, otherwise by the default JUnit Test Runner running a single test in IDE will trigger all the tests.
+
+## Guidelines for Pull Requests
+How to get your contributions merged smoothly and quickly.
+
+- Create **small PRs** that are narrowly focused on **addressing a single concern**. We often times receive PRs that are trying to fix several things at a time, but only one fix is considered acceptable, nothing gets merged and both author's & review's time is wasted. Create more PRs to address different concerns and everyone will be happy.
+
+- For speculative changes, consider opening an issue and discussing it first. If you are suggesting a behavioral or API change, consider starting with a [gRFC proposal](https://github.com/grpc/proposal).
+
+- Provide a good **PR description** as a record of **what** change is being made and **why** it was made. Link to a github issue if it exists.
+
+- Don't fix code style and formatting unless you are already changing that line to address an issue. PRs with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR.
+
+- Unless your PR is trivial, you should expect there will be reviewer comments that you'll need to address before merging. We expect you to be reasonably responsive to those comments, otherwise the PR will be closed after 2-3 weeks of inactivity.
+
+- Maintain **clean commit history** and use **meaningful commit messages**. See [maintaining clean commit history](#maintaining-clean-commit-history) for details.
+
+- Keep your PR up to date with upstream/master (if there are merge conflicts, we can't really merge your change).
+
+- **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on. Also, `./gradlew build` (`gradlew build` on Windows) **must not introduce any new warnings**.
+
+- Exceptions to the rules can be made if there's a compelling reason for doing so.