Skip to content

Commit 6f52042

Browse files
wangjuntaojamiesun
authored andcommitted
docs: 更新 release.prompt.md 添加 [skip ci] 问题处理说明
1 parent 941ba74 commit 6f52042

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/prompts/release.prompt.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@ git push -u origin release/vx.y.z
5656
- PR 标题:`chore: Release vx.y.z`
5757
- PR 内容:第 4 步生成的 Release Notes
5858
- 等待 CI 检查通过
59+
60+
#### ⚠️ 处理 [skip ci] 导致的 CI 跳过问题
61+
62+
如果项目配置了 auto-format 工作流(如 black、isort),该工作流可能会自动添加一个包含 `[skip ci]` 标记的提交,导致 CI 检查被跳过。
63+
64+
**检测方法**
65+
- PR 页面显示 CI 状态为 "Expected — Waiting for status to be reported"
66+
- 检查最新提交消息是否包含 `[skip ci]`
67+
68+
**解决方案**
69+
```bash
70+
# 创建一个空提交来触发 CI
71+
git commit --allow-empty -m "ci: trigger CI checks"
72+
73+
# 如果本地落后于远程(auto-format 已推送)
74+
git pull --rebase
75+
76+
# 推送触发 CI
77+
git push
78+
```
79+
5980
- **重要**:提示用户合并 PR 后再继续
6081

6182
### 5.5 创建标签(PR 合并后)
@@ -90,11 +111,17 @@ git push origin vx.y.z
90111
- 确认版本号未在 PyPI 上使用过
91112
- 确认用户有推送权限
92113

93-
2. **错误处理**
114+
2. **CI 检查问题**
115+
- 如果 PR 创建后 CI 一直显示 "Waiting for status to be reported",检查是否有 auto-format 工作流添加了 `[skip ci]` 提交
116+
- 解决方法:创建空提交 `git commit --allow-empty -m "ci: trigger CI checks"` 并推送
117+
- 确保所有必需的 CI 检查都已通过后再合并 PR
118+
119+
3. **错误处理**
94120
- 如果任何步骤失败,提供清晰的错误信息
95121
- 如果已经打了标签但 Release 失败,说明如何删除标签重试
122+
- 如果发现错误的标签(如版本号不连续),先清理标签再继续发布
96123

97-
3. **可选功能**
124+
4. **可选功能**
98125
- 询问是否需要 pre-release(测试版本)
99126
- 询问是否同时更新文档
100127

0 commit comments

Comments
 (0)