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
pull-requests.md: add guidance for large and/or automatic edits
This primarily came out of the discussion around allowing the use of
LLMs (kubernetes/steering#291), but isn't limited to
it because other tools (search/replace, linters) can have the same effect.
The goal is to clarify expected behavior and to give reviewers something that
they can link to when they decide that a PR shouldn't get merged.
Copy file name to clipboardExpand all lines: contributors/guide/pull-requests.md
+33-1Lines changed: 33 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ It should serve as a reference for all contributors, and be useful especially to
35
35
-[It's OK to Push Back](#its-ok-to-push-back)
36
36
-[Common Sense and Courtesy](#common-sense-and-courtesy)
37
37
-[Trivial Edits](#trivial-edits)
38
+
-[Large or Automatic Edits](#large-or-automatic-edits)
39
+
-[Fixing Linter Issues](#fixing-linter-issues)
38
40
-[The Testing and Merge Workflow](#the-testing-and-merge-workflow)
39
41
-[More About `Ok-To-Test`](#more-about-ok-to-test)
40
42
@@ -268,13 +270,18 @@ handful of people who can approve changes across large portions of the repositor
268
270
are generally the people who are the most busy and hardest to get reviews from, especially
269
271
when you're a new contributor with no connections within the community yet.)
270
272
273
+
The effort required to review such sweeping changes might not be worth it, see
274
+
["large or automatic edits")[#large-or-automatic-edits] below.
275
+
271
276
If you really want to try to get such a PR merged, your best bet is to break up the PR
272
277
into separate PRs for each SIG whose code it touches. You can look at the `OWNERS` files
273
278
in a directory (or its parent directory) to see who owns that code, and then group the
274
279
changes together accordingly (e.g., with one PR touching files in `cmd/kube-proxy` and
275
280
`pkg/util/iptables`, which are owned by SIG Network, and another PR touching files in
276
281
`pkg/kubelet` and `pkg/controller/nodelifecycle`, which are owned by SIG Node.)
277
282
283
+
284
+
278
285
## Comments Matter
279
286
280
287
In your code, if someone might not understand why you did something (or you won't remember why later), comment it. Many code-review comments are about this exact issue.
@@ -590,7 +597,32 @@ at once to that file.
590
597
* Can the file be improved further?
591
598
* Does the trivial edit greatly improve the quality of the content?
592
599
593
-
## Fixing linter issues
600
+
## Large or Automatic Edits
601
+
602
+
Some tools make it very easy to create large Pull Requests, for example:
603
+
- global search/replace
604
+
- linters which automatically correct issues (see also next section)
605
+
- large language models (LLMs) which generate code or documentation
606
+
607
+
To make it easier for reviewers to handle such Pull Requests, please explain
608
+
how it was generated in the "Special notes for your reviewer" section of the
609
+
Pull Request description. Reviewers may then be able to reproduce those steps
610
+
(search/replace, linters) or can start the review with the right expectations
611
+
(LLMs). Also consider the section about [splitting up Pull
0 commit comments