You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance CONTRIBUTING.md with PR and branch naming guidelines (#3067)
* Enhance CONTRIBUTING.md with PR and branch naming guidelines
Added guidelines for keeping pull requests small and clarified branch naming conventions for issue fixes.
* note related bugs in 1 PR probably okay
Clarify guidelines for submitting PRs by emphasizing not to fix unrelated bugs in a single PR.
1.[New Feature or Improvement](#new-feature-or-improvement)
22
22
1.[Shared Forks](#shared-forks)
23
+
1.[Keep PRs small](#keep-prs-small)
23
24
1.[Coding Guidelines](#coding-guidelines)
24
25
1.[GFXR Do's](#gfxr-dos)
25
26
1.[GFXR Don'ts](#gfxr-donts)
@@ -153,15 +154,15 @@ Because of this, we suggest naming in the following fashion:
153
154
154
155
#### Issue Fix
155
156
156
-
If fixing an issue, create a branch based on the issue number, like `fix-1234`
157
-
where `1234` is the issue number in Github.
157
+
If fixing an issue, create a branch based on the fix, like `fix-createinstance-crash`.
158
+
In the description, write "Fixes #1234". When the PR is merged, issue #1234 will automatically be closed.
158
159
159
160
#### New Feature or Improvement
160
161
161
162
If adding a new feature or cleaning up existing changes, provide a descriptive
162
163
branch name.
163
164
164
-
If the change fixes a race condition in pipeline submit, it could be named
165
+
As an example, If the change fixes a race condition in pipeline submit, it could be named
165
166
`fix-pipeline-submit-race-condition`.
166
167
Even if the name conflicts with another developer's branch, the branch
167
168
resides on your fork and appears to the main Github repo as
@@ -172,11 +173,21 @@ resides on your fork and appears to the main Github repo as
172
173
If sharing a fork with multiple people (for example all from the same company),
173
174
it might be useful to prepend the branch with your user nam.
174
175
175
-
For example, instead of `fix-1234` one might create a branch `bob-fix-1234`
176
+
For example, instead of `fix-createinstance-crash` one might create a branch `alice-createinstance-crash`
176
177
to differentiate the work from other people working in the repo.
177
178
178
179
<br/>
179
180
181
+
#### Keep PRs small
182
+
183
+
Submitting multiple unrelated changes in a PR makes reviewing the PR difficult. Create PRs for which the a reviewer can hold the entire change in their head and answer "is this correct and complete?" in a single sitting.
184
+
185
+
Some suggestions to help this process:
186
+
* Don't fix unrelated bugs in one PR.
187
+
* Don't change in a PR the style of code that isn't related to the new functionality or bugfix in the PR.
188
+
* Separate a refactor from a bugfix in which you discovered the refactor was helpful. It is okay to have two PRs reference each other in the description.
189
+
190
+
180
191
## Coding Guidelines
181
192
182
193
### GFXR Do's
@@ -191,11 +202,9 @@ to differentiate the work from other people working in the repo.
191
202
1. Don’t hand-edit C++ headers or implementation files in `framework/generated`.
192
203
To change those files, edit the Python generator scripts and run the
193
204
generator as noted in [Rebase on Dev](#rebase-on-dev)
194
-
195
-
196
205
2. Don't perform unnecessary work in your change (like performing additional
197
206
cleanup beyond your change).
198
-
3. Do not alter existing capture file block structs or IDs.
207
+
4. Do not alter existing capture file block structs or IDs.
199
208
Instead, create new IDs and structs, and deprecate the old blocks so they
0 commit comments