.agents/skills/create-pr/references/template-notes-and-examples.md
优先勾选最贴近主目的的 1 项;确实跨两类时可勾选 2 项,但不要把多个小改动全都勾上。
常见对应关系:
🆕 New feature / 🆕 新特性提交🐞 Bug fix / 🐞 Bug 修复📝 Site / documentation improvement / 📝 站点、文档改进📽️ Demo improvement / 📽️ 演示代码改进💄 Component style improvement / 💄 组件样式/交互改进🤖 TypeScript definition improvement / 🤖 TypeScript 定义更新⚡️ Performance optimization / ⚡️ 性能优化🛠 Refactoring / 🛠 重构✅ Test Case / ✅ 测试用例⏩ Workflow、❓ Other,或标题使用 ci:不要因为 diff 里包含逻辑代码就直接判成 fix。先看“最终在修什么”。
优先判断:
fixfix示例:
site: ...docs: ...demo: ...ci: ...fix(Select): ...有明确 issue 时:
close #12345fix #12345ref #12345没有 issue 时:
Requested in discussion #xxxxNone不要编造 issue 编号。
推荐控制在 2 到 5 行,回答这几件事:
英文示例:
### 💡 Background and Solution
The Select dropdown could jump when the option list changed during search. This PR keeps the scroll position stable after options are updated. No public API changes are introduced.
中文示例:
### 💡 需求背景和解决方案
Select 在搜索过程中更新选项后,下拉列表会出现滚动位置跳动。这个 PR 在选项变更后保持滚动位置稳定。不涉及公开 API 变更。
当改动会影响:
可写成:
### 📝 Change Log
| Language | Changelog |
| ---------- | ------------------------------------------------ |
| 🇺🇸 English | Fix Select dropdown scroll jumping during search |
| 🇨🇳 Chinese | 修复 Select 搜索时下拉列表滚动位置跳动问题 |
常见包括:
sitedocsdemoci这类场景不要硬写影响描述,可直接使用占位:
英文:
### 📝 Change Log
| Language | Changelog |
| ---------- | --------------------- |
| 🇺🇸 English | No changelog required |
| 🇨🇳 Chinese | 无需更新日志 |
中文:
### 📝 更新日志
| 语言 | 更新描述 |
| ------- | --------------------- |
| 🇺🇸 英文 | No changelog required |
| 🇨🇳 中文 | 无需更新日志 |
也可以更短,直接写:
N/ANo changelog required无需更新日志前提是保留模板 section,不要直接删掉整个 changelog 区块。
目标是尽量推断“当前分支实际从哪里切出来”,而不是拍脑袋默认 master。
建议顺序:
base branch -> 直接使用reflog 看出 checkout 来源git branch -vv 的 tracking / upstream 作为辅助线索merge-base 比较候选分支建议命令:
git branch --show-current
git branch -vv
git reflog show --date=local $(git branch --show-current)
git remote show origin
git merge-base HEAD <candidate-branch>
注意:
reflog 最接近真实答案,但不一定一直存在在真正执行 gh pr create 之前,应该先给用户一个确认版草稿,例如:
我先整理了一版待提交的 PR 草稿,请你确认:
- Base branch: `feature-x`
- PR title: `site: adjust token panel interaction on theme preview page`
- PR type: `📝 Site / documentation improvement`
- Change Log: `No changelog required`
如果没问题,我再继续创建 PR;如果你想改 title、type、base 或正文,我先帮你改。
ant-design 的 PR 标题应固定使用英文,并遵循本 skill 约定的模式:
<type>: <subject><type>(<scope>): <subject>常见 type:
featfixdocsrefactortypesitedemotestcichoreperf英文:
fix: improve TreeSelect codedocs: add CLAUDE.md for AI assistant contextrefactor(Image): extract normalizePlaceholder to usePlaceholderConfig hooksite: fix ThemePreview copy button in dark themefeat: add Typography.Shimmer componentci: adjust pull request label workflow更贴近当前分支时,可写成:
fix(Select): keep dropdown scroll position stable during searchdocs: clarify Upload beforeUpload return behaviorrefactor(Table): simplify sticky offset calculationsite: refine AI theme page empty state copy不要这样写:
修复 Select 搜索后下拉滚动跳动问题update selectfix issuessome improvements