Skip to content

Commit 985eb50

Browse files
authored
Revise PR guidelines for public API changes and examples
Updated language for clarity and consistency in PR guidelines.
1 parent a545d31 commit 985eb50

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

docs/PR.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Write for senior engineers familiar with the SDK. Assume your reader:
1818
Every PR description should have:
1919

2020
1. **Motivation** — Why is this change needed?
21-
2. **Public API Changes** — What changes to the public API (with code examples)?
22-
3. **Use Cases** (optional) — When would developers use this feature? Only include for non-obvious functionality; skip for trivial changes.
21+
2. **Public API Changes** — What changes to the public API (with code snippets)?
22+
3. **Use Cases** (optional) — When would developers use this feature? Only include for non-obvious functionality; skip for trivial changes or obvious fixes.
2323
4. **Breaking Changes** (if applicable) — What breaks and how to migrate?
2424

2525
## Writing Principles
@@ -29,9 +29,9 @@ Every PR description should have:
2929
- ✅ "The OpenAI SDK supports dynamic API keys, but we don't expose this capability"
3030
- ❌ "Added ApiKeySetter type import from openai/client"
3131

32-
**Document public API changes with examples:**
32+
**Document public API changes with example code snippets:**
3333

34-
- ✅ Show before/after code examples for API changes
34+
- ✅ Show before/after code snippets for API changes
3535
- ❌ List every file or line changed
3636

3737
**Be concise:**
@@ -117,7 +117,6 @@ const model = new OpenAIModel({
117117
apiKey: async () => await secretManager.getApiKey(),
118118
})
119119
```
120-
````
121120

122121
The change is backward compatible—all existing string-based usage continues
123122
to work without modification.
@@ -145,7 +144,7 @@ Resolves: #[issue-number]
145144

146145
## Public API Changes
147146

148-
[Document changes to public APIs with before/after code examples. If no public
147+
[Document changes to public APIs with before/after code snippets. If no public
149148
API changes, state "No public API changes."]
150149

151150
```typescript
@@ -155,14 +154,13 @@ API changes, state "No public API changes."]
155154
// After
156155
[new API usage]
157156
```
158-
````
159157

160158
[Explain behavior, parameters, return values, and backward compatibility.]
161159

162160
## Use Cases (optional)
163161

164-
[Only include for non-obvious functionality. Provide 2-4 concrete use cases
165-
showing when developers would use this feature. Skip for trivial changes.]
162+
[Only include for non-obvious functionality. Provide 1-3 concrete use cases
163+
showing when developers would use this feature. Skip for trivial changes obvious fixes..]
166164

167165
## Breaking Changes (if applicable)
168166

@@ -178,7 +176,7 @@ showing when developers would use this feature. Skip for trivial changes.]
178176
[new code]
179177
```
180178

181-
```
179+
````
182180
183181
## Why These Guidelines?
184182
@@ -192,7 +190,6 @@ showing when developers would use this feature. Skip for trivial changes.]
192190
193191
- [Conventional Commits](https://www.conventionalcommits.org/)
194192
- [Google's Code Review Guidelines](https://google.github.io/eng-practices/review/)
195-
```
196193
197194
## Checklist Items
198195

0 commit comments

Comments
 (0)