Files
rui-docs/ai-skills/issue-workflow.md
T
vifo 7b2f3d77ca docs: 支付模块开发文档 + git 域名更新
- 新增 backend/design/支付模块架构概览.md
- 新增 backend/design/支付模块数据库设计.md (21张表 DDL)
- 新增 backend/design/支付模块接口设计.md
- git.dev.vifo.cc → git.vifo.cc 全局替换
2026-06-09 01:54:29 +08:00

2.9 KiB

工单处理流程

标准流程

1. 读取工单

使用 Gitea API 获取 Issue 内容:

TOKEN=$(cat ~/.config/gitea/token)
curl -s -H "Authorization: token ${TOKEN}" \
  "https://git.vifo.cc/api/v1/repos/{owner}/{repo}/issues/{id}"

也可以列出当前仓库所有未关闭的工单:

TOKEN=$(cat ~/.config/gitea/token)
curl -s -H "Authorization: token ${TOKEN}" \
  "https://git.vifo.cc/api/v1/repos/{owner}/{repo}/issues?state=open"

2. 分析需求

  • 阅读工单标题和描述
  • 确认需求范围是否属于当前仓库
  • 检查相关配置文件和代码
  • 必要时向用户澄清

3. 判断工单归属

如果工单内容不属于当前仓库,需要路由到正确的仓库:

问题类型 正确仓库
框架能力、公共工具、安全、Feign rui-framework
系统管理、用户管理接口 rui-framework
收银业务逻辑 rui-cashier
支付业务逻辑 rui-payment
前端页面、UI 组件 rui-frontend
文档、规范、技能 rui-docs

路由方式:在当前仓库回复工单说明需转交,然后向目标仓库创建新 Issue。

4. 实施修改

按 Superpowers 工作流处理:

  • 简单任务:直接实施
  • 复杂任务:设计 -> 计划 -> 实施

5. 回复工单

完成后必须回复工单:

TOKEN=$(cat ~/.config/gitea/token)
curl -s -X POST \
  -H "Authorization: token ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"body": "✅ 已完成\n\n完成内容..."}' \
  "https://git.vifo.cc/api/v1/repos/{owner}/{repo}/issues/{id}/comments"

6. 关闭工单

TOKEN=$(cat ~/.config/gitea/token)
curl -s -X PATCH \
  -H "Authorization: token ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"state": "closed"}' \
  "https://git.vifo.cc/api/v1/repos/{owner}/{repo}/issues/{id}"

跨仓库提工单

当当前仓库开发中需要其他仓库配合时:

  1. 确认问题属于目标仓库
  2. 通过 Gitea API 向目标仓库创建 Issue
  3. 在当前仓库的 git commit 中注明关联工单
# 示例:payment 需要框架新增能力,向 rui-framework 提交
cat > /tmp/issue.json << 'EOF'
{
  "title": "[API-REQ] 需要新增支付回调重试工具",
  "body": "## 来源\n\nrui-payment 模块请求\n\n## 功能描述\n\n...\n\n## 优先级\n\n高"
}
EOF

TOKEN=$(cat ~/.config/gitea/token)
curl -s -X POST \
  -H "Authorization: token ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d @/tmp/issue.json \
  "https://git.vifo.cc/api/v1/repos/rui/rui-framework/issues"

提交规范

  • 提交信息需关联工单编号:对应工单 #2
  • 使用语义化提交前缀:feat:, fix:, docs:, chore:

优先级处理

优先级 标识 处理时效
P0 紧急 立即处理
P1 当天完成
P2 2-3天内
P3 排期处理