Commit Graph

5 Commits

Author SHA1 Message Date
whale 0efb085bf3 merge: sync with upstream, keep our changes 2026-06-04 08:31:35 +08:00
wauxing a4507ca9e9 refactor: batch 操作重构 + 修复 assign API 字段 + 补充单元测试
重构:
- 引入 BatchOptions 结构体,RunBatch 签名从 7 参数简化为结构体
- 提取 batchStateFlags/runBatchStateChange 消除 batch-close/batch-open 重复
- 提取 patchIssue 统一 fetch→patch 模式
- 延迟 API 调用到回调内,修复 --dry-run 仍触发网络请求的问题
- 消除 resolveAssigneeID,统一用 ResolveUserID

修复:
- assigned_to_id → assigner_ids(GitLink API 设置经办人的正确字段)
- searchIssues 移除 id fallback,避免用全局 ID 调 PATCH 导致 404
- priority 非法值从静默忽略改为显式报错
- --action 做 case-insensitive 处理

清理:
- 删除 closeIssue 死代码、existingIssue 类型别名、DoneRatio 字段
- 注释统一为中文

测试:
- 新增 batch_operation_test.go,覆盖 RunBatch 核心行为、patchIssue、
  label 合并/移除、status 解析、parseBatchOptions
2026-06-01 16:40:37 +08:00
wauxing 2e26d586a5 refactor: migrate batch-close to shared engine 2026-06-01 16:40:37 +08:00
wbtiger 0170b5b063 test: add comprehensive test coverage across all packages (88.5% → 90.3%)
Add 18 new test files covering formatter, envelope, config, auth,
client, context, register, and all shortcut group packages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 15:41:54 +08:00
wangyue789 b2e840f498 feat(issue): add batch close shortcut with dry-run support 2026-05-13 17:27:50 +08:00