Skip to content

Commit d7e33d5

Browse files
authored
docs: give guidance on pr body content (#3742)
I've noticed that AI-generated PR descriptions are very verbose with lots of the typical AI formatting, filler words, qualifiers, and read more as a persuasive essay than an effective description of a change. Add a bit of guidance to the contribution guide and agents config to help curtail that slop a bit.
1 parent c3c0daf commit d7e33d5

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ project.
55

66
Act as an expert in Bazel, rules_python, Starlark, and Python.
77

8-
DO NOT `git commit` or `git push`.
8+
DO NOT `git commit` or `git push` unless given explicit permission.
99

1010
## RULES TO ALWAYS FOLLOW AND NEVER IGNORE
1111

@@ -30,6 +30,11 @@ into the sentence, not verbatim.
3030
When adding `{versionadded}` or `{versionchanged}` sections, add them add the
3131
end of the documentation text.
3232

33+
### PR descriptions
34+
35+
Follow the advice in `CONTRIBUTING.md` for PR descriptions. PR descriptions
36+
become the commit message upon merge.
37+
3338
### Starlark style
3439

3540
For doc strings, using triple quoted strings when the doc string is more than

CONTRIBUTING.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ information on using pull requests.
103103

104104
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
105105

106-
### Commit messages
106+
### Commit messages and PR descriptions
107107

108108
Commit messages (upon merging) and PR messages should follow the [Conventional
109109
Commits](https://www.conventionalcommits.org/) style:
@@ -139,9 +139,36 @@ Common `type`s:
139139
* `revert:` means a prior change is being reverted in some way.
140140
* `test:` means only tests are being added.
141141

142+
For the body, follow this guidance:
143+
144+
* Briefly tells *why* the change is being made. This usually means
145+
briefly describing how a bug manifests or what can't be accomplished
146+
without the feature.
147+
* Briefly gives an overview of *how* the code is changed. This is to
148+
orient readers for the diff they're about to read and understand; it's
149+
not a verbatim description of what changed.
150+
* List unrelated or notable dev-only changes at the end. e.g. formatting an
151+
old file, cleaning up testing, adding test support code, etc.
152+
142153
For the full details of types, see
143154
[Conventional Commits](https://www.conventionalcommits.org/).
144155

156+
#### PR description example
157+
158+
```
159+
fix(pypi): handle files with .exe extensions
160+
161+
Currently, if a file with `.exe` is seen, an error
162+
occurs because validation assumes unix-only filenames.
163+
This prevents using whls with pre-built .exe files in
164+
their data payload.
165+
166+
To fix, detect the target OS and use an OS-appropriate
167+
validation function.
168+
169+
* Also adds test helpers for detecting the current OS
170+
```
171+
145172
### Documenting changes
146173

147174
Changes are documented in two places: CHANGELOG.md and API docs.

0 commit comments

Comments
 (0)