@@ -33,17 +33,21 @@ guidelines, there may be valid reasons to do so, but it should be rare.
33
33
34
34
## Guidelines for Pull Requests
35
35
36
- How to get your contributions merged smoothly and quickly:
36
+ Please read the following carefully to ensure your contributions can be merged
37
+ smoothly and quickly.
38
+
39
+ ### PR Contents
37
40
38
41
- Create ** small PRs** that are narrowly focused on ** addressing a single
39
42
concern** . We often receive PRs that attempt to fix several things at the same
40
43
time, and if one part of the PR has a problem, that will hold up the entire
41
44
PR.
42
45
43
- - For ** speculative changes** , consider opening an issue and discussing it
44
- first. If you are suggesting a behavioral or API change, consider starting
45
- with a [ gRFC proposal] ( https://github.com/grpc/proposal ) . Many new features
46
- that are not bug fixes will require cross-language agreement.
46
+ - If your change does not address an ** open issue** with an ** agreed
47
+ resolution** , consider opening an issue and discussing it first. If you are
48
+ suggesting a behavioral or API change, consider starting with a [ gRFC
49
+ proposal] ( https://github.com/grpc/proposal ) . Many new features that are not
50
+ bug fixes will require cross-language agreement.
47
51
48
52
- If you want to fix ** formatting or style** , consider whether your changes are
49
53
an obvious improvement or might be considered a personal preference. If a
@@ -56,16 +60,6 @@ How to get your contributions merged smoothly and quickly:
56
60
often written as "iff". Please do not make spelling correction changes unless
57
61
you are certain they are misspellings.
58
62
59
- - Provide a good ** PR description** as a record of ** what** change is being made
60
- and ** why** it was made. Link to a GitHub issue if it exists.
61
-
62
- - Maintain a ** clean commit history** and use ** meaningful commit messages** .
63
- PRs with messy commit histories are difficult to review and won't be merged.
64
- Before sending your PR, ensure your changes are based on top of the latest
65
- ` upstream/master ` commits, and avoid rebasing in the middle of a code review.
66
- You should ** never use ` git push -f ` ** unless absolutely necessary during a
67
- review, as it can interfere with GitHub's tracking of comments.
68
-
69
63
- ** All tests need to be passing** before your change can be merged. We
70
64
recommend you run tests locally before creating your PR to catch breakages
71
65
early on:
@@ -81,15 +75,80 @@ How to get your contributions merged smoothly and quickly:
81
75
GitHub, which will trigger a GitHub Actions run that you can use to verify
82
76
everything is passing.
83
77
84
- - If you are adding a new file, make sure it has the ** copyright message**
78
+ - Note that there are two github actions checks that need not be green:
79
+
80
+ 1 . We test the freshness of the generated proto code we maintain via the
81
+ ` vet-proto ` check. If the source proto files are updated, but our repo is
82
+ not updated, an optional checker will fail. This will be fixed by our team
83
+ in a separate PR and will not prevent the merge of your PR.
84
+
85
+ 2 . We run a checker that will fail if there is any change in dependencies of
86
+ an exported package via the ` dependencies ` check. If new dependencies are
87
+ added that are not appropriate, we may not accept your PR (see below).
88
+
89
+ - If you are adding a ** new file** , make sure it has the ** copyright message**
85
90
template at the top as a comment. You can copy the message from an existing
86
91
file and update the year.
87
92
88
93
- The grpc package should only depend on standard Go packages and a small number
89
94
of exceptions. ** If your contribution introduces new dependencies** , you will
90
- need a discussion with gRPC-Go maintainers. A GitHub action check will run on
91
- every PR, and will flag any transitive dependency changes from any public
92
- package.
95
+ need a discussion with gRPC-Go maintainers.
96
+
97
+ ### PR Descriptions
98
+
99
+ - ** PR titles** should start with the name of the component being addressed, or
100
+ the type of change. Examples: transport, client, server, round_robin, xds,
101
+ cleanup, deps.
102
+
103
+ - Read and follow the ** guidelines for PR titles and descriptions** here:
104
+ https://google.github.io/eng-practices/review/developer/cl-descriptions.html
105
+
106
+ * particularly* the sections "First Line" and "Body is Informative".
107
+
108
+ Note: your PR description will be used as the git commit message in a
109
+ squash-and-merge if your PR is approved. We may make changes to this as
110
+ necessary.
111
+
112
+ - ** Does this PR relate to an open issue?** On the first line, please use the
113
+ tag ` Fixes #<issue> ` to ensure the issue is closed when the PR is merged. Or
114
+ use ` Updates #<issue> ` if the PR is related to an open issue, but does not fix
115
+ it. Consider filing an issue if one does not already exist.
116
+
117
+ - PR descriptions * must* conclude with ** release notes** as follows:
118
+
119
+ ```
120
+ RELEASE NOTES:
121
+ * <component>: <summary>
122
+ ```
123
+
124
+ This need not match the PR title.
125
+
126
+ The summary must:
127
+
128
+ * be something that gRPC users will understand.
129
+
130
+ * clearly explain the feature being added, the issue being fixed, or the
131
+ behavior being changed, etc. If fixing a bug, be clear about how the bug
132
+ can be triggered by an end-user.
133
+
134
+ * begin with a capital letter and use complete sentences.
135
+
136
+ * be as short as possible to describe the change being made.
137
+
138
+ If a PR is * not* end-user visible -- e.g. a cleanup, testing change, or
139
+ github-related, use ` RELEASE NOTES: n/a ` .
140
+
141
+ ### PR Process
142
+
143
+ - Please ** self-review** your code changes before sending your PR. This will
144
+ prevent simple, obvious errors from causing delays.
145
+
146
+ - Maintain a ** clean commit history** and use ** meaningful commit messages** .
147
+ PRs with messy commit histories are difficult to review and won't be merged.
148
+ Before sending your PR, ensure your changes are based on top of the latest
149
+ ` upstream/master ` commits, and avoid rebasing in the middle of a code review.
150
+ You should ** never use ` git push -f ` ** unless absolutely necessary during a
151
+ review, as it can interfere with GitHub's tracking of comments.
93
152
94
153
- Unless your PR is trivial, you should ** expect reviewer comments** that you
95
154
will need to address before merging. We'll label the PR as `Status: Requires
@@ -98,5 +157,3 @@ How to get your contributions merged smoothly and quickly:
98
157
` stale ` , and we will automatically close it after 7 days if we don't hear back
99
158
from you. Please feel free to ping issues or bugs if you do not get a response
100
159
within a week.
101
-
102
- - Exceptions to the rules can be made if there's a compelling reason to do so.
0 commit comments