docs: add Git PR workflow to CLAUDE.md

Document the new PR-based workflow with Gitea branch protection.
This commit is contained in:
34047007@qq.com
2026-07-27 08:23:41 +08:00
parent 036494ae35
commit 57134561ea
+21
View File
@@ -171,3 +171,24 @@ curl -X POST "localhost:8000/api/v1/admin/pipeline/refresh-citations?limit=500"
- **Dev mode password reset** returns the reset link directly in API response (no SMTP needed).
- **`user["sub"]` is a string.** Always convert to `uuid.UUID()` before passing to SQLAlchemy queries.
- **搜索功能必须与 PubMed 完全一致。** 这是硬性要求,不是"未来优化"。所有 PubMed 字段标签必须全量支持,已存储数据的立即接通搜索路径,缺失数据的补充 XML 抽取和存储。不允许任何字段退化到纯文本搜索。
## Git Workflow (PR)
代码托管在自建 Gitea: http://123.207.9.209:3000/scilit/backend。**严禁直接 push 到 main 分支**Gitea 端已设置 branch protection)。所有改动必须走 Pull Request。
### ClaudeCode 工作流
1. 从 main 新建分支:`git checkout -b feat/xxx``fix/xxx`
2. 在分支上修改代码、commit
3. Push 分支:`git push origin 分支名`
4. 用户访问 Gitea 创建 PRReview 后 Merge
### 分支命名规范
- `feat/xxx` — 新功能
- `fix/xxx` — 修复
- `refactor/xxx` — 重构
- `docs/xxx` — 文档
- `chore/xxx` — 杂项
### 仓库地址
- SSH: `git@gitea:scilit/backend.git`
- Web: http://123.207.9.209:3000/scilit/backend