write-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWriting pull requests
编写拉取请求(PR)
Standards for PR titles and descriptions in tldraw/tldraw.
tldraw/tldraw仓库中PR标题和描述的规范。
PR title
PR标题
Use semantic PR titles (Conventional Commits format):
<type>(<scope>): <description>使用语义化PR标题(遵循Conventional Commits格式):
<type>(<scope>): <description>Types
类型
- - New feature
feat - - Bug fix
fix - - Documentation only
docs - - Code change that neither fixes a bug nor adds a feature
refactor - - Performance improvement
perf - - Adding or fixing tests
test - - Maintenance tasks
chore
- - 新功能
feat - - 修复Bug
fix - - 仅文档更新
docs - - 既不修复Bug也不添加功能的代码变更
refactor - - 性能优化
perf - - 添加或修复测试
test - - 维护任务
chore
Scope (optional)
范围(可选)
A noun describing the affected area: , ,
fix(editor):feat(sync):docs(examples):描述受影响区域的名词:, ,
fix(editor):feat(sync):docs(examples):Examples
示例
feat(editor): add snap threshold configuration optionfix(arrows): correct binding behavior with rotated shapesdocs: update sync documentationrefactor(store): simplify migration system
feat(editor): add snap threshold configuration optionfix(arrows): correct binding behavior with rotated shapesdocs: update sync documentationrefactor(store): simplify migration system
PR body
PR正文
Use this template:
md
<description paragraph>使用以下模板:
md
<description paragraph>Change type
Change type
- |
bugfix|improvement|feature|apiother
- |
bugfix|improvement|feature|apiother
Test plan
Test plan
- Step to test...
- Another step...
- Unit tests
- End to end tests
- Step to test...
- Another step...
- Unit tests
- End to end tests
Release notes
Release notes
- Brief description of changes for users
undefined- Brief description of changes for users
undefinedDescription paragraph
描述段落
Start with: "In order to X, this PR does Y."
- Keep it specific - avoid vague phrases like "improve user experience"
- Link related issues in the first paragraph
- Don't expect readers to also read the linked issue
以“为了X,本PR实现了Y。”开头。
- 内容要具体 - 避免“提升用户体验”这类模糊表述
- 在第一段中关联相关议题(Issue)
- 不要假设读者会同时阅读关联的议题
Change type
变更类型
- Tick exactly one type with
[x] - Delete unticked items
- 用勾选恰好一个类型
[x] - 删除未勾选的选项
Test plan
测试计划
- List manual testing steps if applicable
- Remove the numbered list if changes cannot be manually tested
- Tick checkboxes for included test types
- 如有需要,列出手动测试步骤
- 如果变更无法手动测试,移除编号列表
- 勾选已包含的测试类型对应的复选框
Release notes
发布说明
- Write brief notes describing user-facing changes
- Use imperative mood: "Add...", "Fix...", "Remove..."
- Omit this section entirely for internal work (CI, tooling, tests, etc.) that has no user-facing impact
- 编写描述用户可见变更的简短说明
- 使用祈使语气:“添加...”, “修复...”, “移除...”
- 对于无用户可见影响的内部工作(如CI、工具、测试等),完全省略此部分
API changes section
API变更部分
Include when changes affect :
api-report.mdmd
undefined当变更影响时需要包含:
api-report.mdmd
undefinedAPI changes
API changes
- Added for X
Editor.newMethod() - Breaking! Removed
Editor.oldMethod() - Changed to accept optional
Editor.method()parameteroptions
undefined- Added for X
Editor.newMethod() - Breaking! Removed
Editor.oldMethod() - Changed to accept optional
Editor.method()parameteroptions
undefinedRelated issues
相关议题
Search for and link relevant issues that this PR addresses.
搜索并关联本PR解决的相关议题。
Important
重要提示
- Never include "Generated with Claude Code" unless the PR directly relates to Claude Code
- Never use title case for descriptions - use sentence case
- Never put yourself as co-author of any commits
- Always include an API changes section if the PR has changes to any api-report.md
- 除非PR直接与Claude Code相关,否则绝不要包含“Generated with Claude Code”
- 描述部分绝不要使用标题大小写,使用句子大小写
- 绝不要将自己列为任何提交的合著者
- 如果PR对任何api-report.md有变更,务必包含API变更部分