退役 pr-flow,提交流程统一到全局 skill repo-workflow #176
No files matched your search
@@ -20,7 +20,8 @@ cmake --build --preset R190 --config Debug --target <Target>
|
||||
| AutoCAD | `R180 R190 R200 R210 R220 R230 R240 R243 R250 R260` |
|
||||
| 中望CAD | `Z2023 Z2024 Z2025 Z2026` |
|
||||
|
||||
R190 = AutoCAD 2019(C++98),R250/R260 = 2025/2027(C++20)。
|
||||
R190 = AutoCAD 2019(C++98),R250 = 2025(C++14),R260 = 2027(C++20)。
|
||||
标准由 `CAD_SDK_VERSION` 决定:`<20` → C++98,`20–25` → C++14,`26+` → C++20(见 cmakelists.txt)。
|
||||
不确定用哪个就先用 `R190`:标准最老,代码最容易暴露问题,且 Debug 编译最快。
|
||||
|
||||
## 常用 target
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
name: pr-flow
|
||||
description: Commit and push changes the way this repo requires — branch naming, Chinese commit messages, and pushing to refs/for/main for Gitea review. Use whenever the user asks to commit, push, or open a PR here.
|
||||
---
|
||||
|
||||
# 提交与推送流程
|
||||
|
||||
远端:`origin = ssh://git@39.107.55.179:222/gjm/envi-code.git`(Gitea),主干 `main`。
|
||||
**不要直推 `main`。**
|
||||
|
||||
## 1. 分支
|
||||
|
||||
```bash
|
||||
git fetch origin
|
||||
git log --oneline -1 origin/main # 确认起点
|
||||
git checkout -b <分支名>
|
||||
```
|
||||
|
||||
分支名沿仓库历史惯例,优先 `<git config user.name>/<英文短横线描述>`:
|
||||
|
||||
```
|
||||
company-desktop-computer/perf-pipe-style-sqlite-cache
|
||||
home-laptop/fix-aecdbslab-memory-leaks
|
||||
```
|
||||
|
||||
也见过纯英文(`refactor-i_aecdbxequipment-copyfrom`)和带分类前缀(`docs/xxx`、`fix/xxx`),但不要用中文分支名。
|
||||
|
||||
## 2. commit
|
||||
|
||||
- message **用中文**;代码修复开头用「修复」或 `fix:` / `perf:` / `refactor:` / `docs:`
|
||||
- **代码与文档分开两个 commit**(便于单独 review / revert),历史先例:
|
||||
`f349ed2 补充 HLR 模块问题记录文档`、`9b80db3 rafactor-pipe,fitting-speedup`
|
||||
- message 正文写清:现象 → 根因 → 改动范围 → 与之前 PR 的关系 → 验证方式 → 已知风险
|
||||
- 用 `git commit -F <文件>` 传多行中文 message,避免 shell 引号问题
|
||||
|
||||
## 3. 推送
|
||||
|
||||
```bash
|
||||
git push origin HEAD:refs/for/main/<分支名>
|
||||
```
|
||||
|
||||
成功后 Gitea 会返回 PR 地址(`http://39.107.55.179:3000/gjm/envi-code/pulls/<N>`)。
|
||||
更新同一个 PR:amend / 追加 commit 后再推一次同一个分支名即可。
|
||||
|
||||
## 4. 提交前检查
|
||||
|
||||
- [ ] `git status --short` 干净,无临时文件、无 `cmake_output/` 之类产物
|
||||
- [ ] `git diff --numstat` 不是整文件重写
|
||||
- [ ] 改过 `.cpp/.h` → `git diff --numstat` 确认不是整文件重写(BOM 只在整文件重写时才会丢)
|
||||
- [ ] 至少编过受影响的 target(`build-arx` skill)
|
||||
- [ ] **没做过 CAD 实测就在 PR 里写明"仅编译验证"**,并列出待实测项
|
||||
|
||||
## 5. 安全
|
||||
|
||||
- 各机器 SSH 私钥不同,在 `~/.ssh/config` 里指定;**私钥文件名不要写进仓库**。
|
||||
- 不要把 `auth.json`、token、客户专版配置提交进来。
|
||||
@@ -76,7 +76,7 @@
|
||||
| skill | 用途 |
|
||||
| --- | --- |
|
||||
| `build-arx` | 按 preset 编译、单 target、产物与部署路径 |
|
||||
| `pr-flow` | 分支命名 / 中文 commit / `refs/for/main` 推送 |
|
||||
| `pr-flow` | **已退役** → 改用全局 skill `repo-workflow`(提交流程已跨仓库统一) |
|
||||
| `analyze-big-entity` | 万行实体类的分析与改动套路 |
|
||||
| `notify-decision` | 需要用户拍板时主动推送通知(桌面 toast / IM 机器人),不让他干等终端 |
|
||||
|
||||
|
||||
Reference in new issue
Block a user