Weekly Report Flow (DevOps → Summary → EMOP)
When to use
- - User asks to generate/submit weekly reports.
- User asks to backfill missing weeks.
- User asks to automate the DevOps→summary→EMOP flow.
Required inputs
- - DEVOPS_TOKEN in environment (never write to disk)
- EMOP token in environment (never write to disk)
- Assignee default: 姚江峰
- Types: 需求/任务/缺陷
Workflow
1)
Pull DevOps workitems
- Use browser session if direct API returns 403.
- Endpoint:
/projex/api/workitem/workitem/list?_input_charset=utf-8
- Header:
x-yunxiao-token: $DEVOPS_TOKEN
- Page size 200, iterate all pages.
- Filter in client by assignee/nickName and type.
2) Classify
- Include current sprint workitems.
- Include last-week created items not in current sprint.
- Last week: Mon 00:00 → Sun 23:59 (Asia/Shanghai).
3) Summarize
- 200–300 Chinese characters, department-formal, not流水账.
- Output Markdown and also HTML ordered list <ol><li>...</li></ol>.
4) Submit to EMOP
- POST https://emop.oureman.com/api/weekly/report
- Headers: token: $EMOP_TOKEN, Content-Type: application/json; charset=utf-8
- Body fields:
- date: single day (last Friday, yyyy-MM-dd)
- reportDate: ISO UTC yyyy-MM-ddTHH:mm:ss.000Z
- content: <ol><li>...</li></ol>
- Ensure UTF-8 bytes to avoid乱码.
Backfill mode
- - For each missing week (by Friday date), pull DevOps items for that week and generate summary.
- Submit one report per week.
References
- - See
references/urls.md for project URLs and IDs. - See
references/cli.md for local script entrypoints.
周报流程 (DevOps → 摘要 → EMOP)
使用场景
- - 用户要求生成/提交周报
- 用户要求补填缺失周报
- 用户要求自动化DevOps→摘要→EMOP流程
必需输入
- - DEVOPS_TOKEN 环境变量(禁止写入磁盘)
- EMOP token 环境变量(禁止写入磁盘)
- 经办人 默认:姚江峰
- 类型:需求/任务/缺陷
工作流程
1)
拉取DevOps工作项
- 若直接API返回403,则使用浏览器会话
- 接口:/projex/api/workitem/workitem/list?
inputcharset=utf-8
- 请求头:x-yunxiao-token: $DEVOPS_TOKEN
- 每页200条,遍历所有分页
- 客户端按经办人/昵称和类型过滤
2) 分类
- 包含当前迭代的工作项
- 包含上周创建但不在当前迭代的工作项
- 上周:周一00:00 → 周日23:59(亚洲/上海时区)
3) 生成摘要
- 200-300个中文字符,部门正式用语,非流水账
- 输出Markdown格式,同时输出HTML有序列表
- ...
4) 提交至EMOP
- POST请求至https://emop.oureman.com/api/weekly/report
- 请求头:token: $EMOP_TOKEN,Content-Type: application/json; charset=utf-8
- 请求体字段:
- date:单日(上周五,yyyy-MM-dd格式)
- reportDate:ISO UTC格式yyyy-MM-ddTHH:mm:ss.000Z
- content:
- ...
- 确保UTF-8编码字节,避免乱码
补填模式
- - 针对每个缺失周(按周五日期),拉取该周DevOps工作项并生成摘要
- 每周提交一份报告
参考
- - 项目URL和ID参见references/urls.md
- 本地脚本入口参见references/cli.md