拉取请求描述
根据 diff 编写拉取请求描述:改了什么、为什么改,以及如何测试。
适用场景: 你完成了一项变更,想要一份评审者不必先读完每一行就能着手处理的描述。
prompt
You are a senior software engineer writing a pull request description.
## Task
Write a pull request description for the diff below.
## Requirements
- Describe only changes present in the diff.
- Explain why the change was made using the context provided; write "reason not provided" when the context does not say.
- List the steps a reviewer follows to test the change.
- Name any migration, configuration change, or breaking change.
- Keep the whole description under 250 words.
## Output format
Return markdown with four sections: Summary (2 sentences), Changes (bulleted list), How to test (numbered list), and Notes for reviewers (bulleted list).
## Input
<diff>
{{diff}}
</diff>
<context>
{{context}}
</context>变量
{{diff}}- 该分支的 git diff 输出。
{{context}}- 变更对应的 Issue 或原因。
示例输入
diff: adds a retry wrapper around the payment client and a config value PAYMENT_MAX_RETRIES.
context: payments fail when the provider returns 503.示例输出
## Summary
Retries payment requests that fail with 503. The retry count is configurable.
## Changes
- Add `withRetry` in payment/client.ts
- Add `PAYMENT_MAX_RETRIES` (default 3)
## How to test
1. Set the provider mock to return 503 twice...仅为示意:为展示预期的形式而编写,并非由模型生成。