feat(shortcuts): 新增 wiki/commit/file/star/watch 模块及批量操作 #147

Closed
chroe wants to merge 0 commits from chroe/gitlink-cli:pr/shortcuts-modules into master
Contributor

概述

本 PR 新增 5 个 Shortcut 模块和 3 个批量操作模块,累计贡献覆盖 18 个模块共 94 个命令、7 个批量操作。

本次 PR 新增的模块

模块 命令数 命令列表
wiki 5 list, view, create, update, delete(含 Sidebar 自动清理)
commit 4 list, view, diff, blame
file 5 list, tree, get, create, delete(自动 base64)
star 3 star, unstar, stars
watch 3 watch, unwatch, watchers

本次 PR 新增的批量操作

模块 命令 说明
member batch-add 批量添加成员
org batch-invite 批量邀请(用户名→ID 自动解析)
repo batch-create/batch-fork/batch-delete 批量仓库管理

所有批量操作支持 --dry-run 预览和 --from CSV 文件输入。

本小组完整贡献(含已提交的其他改动)

除本 PR 外,我们小组还对以下已有模块进行了增强和修复,相关改动已在 fork 仓库完成:

  • issue: 新增 reopen、batch-reopen、batch-comment 命令;修复 assign 传递数字 ID、保留 status_id 防止状态被重置
  • repo/org: 修复 batch-invite 用户名自动解析为数字 ID
  • watch/star: 修复 resolveProjectID 兼容 project_id 字段
  • output: table 输出格式优化,改善中英文混排对齐
  • client: 新增 DoRaw 方法,支持不带 .json 后缀的网关 API(如 Wiki)
  • CI/CD: 新增 FreeBSD amd64/arm64 构建支持

测试

每个模块包含 httptest mock 单元测试(wiki 12个 + 其他模块 19+个)。

变更说明文档

详见 doc/changes/new-shortcut-modules.md

⚠️ 注意

本 PR 的代码基于旧版 API 签名 Shortcuts() 无参数版本,需适配新版 i18n 翻译器接口 Shortcuts(tr) 后方可编译。Wiki 模块依赖 client.DoRaw() 方法。如需我方协助适配请告知。

## 概述 本 PR 新增 5 个 Shortcut 模块和 3 个批量操作模块,累计贡献覆盖 18 个模块共 94 个命令、7 个批量操作。 ## 本次 PR 新增的模块 | 模块 | 命令数 | 命令列表 | |------|--------|---------| | wiki | 5 | list, view, create, update, delete(含 Sidebar 自动清理) | | commit | 4 | list, view, diff, blame | | file | 5 | list, tree, get, create, delete(自动 base64) | | star | 3 | star, unstar, stars | | watch | 3 | watch, unwatch, watchers | ## 本次 PR 新增的批量操作 | 模块 | 命令 | 说明 | |------|------|------| | member | batch-add | 批量添加成员 | | org | batch-invite | 批量邀请(用户名→ID 自动解析) | | repo | batch-create/batch-fork/batch-delete | 批量仓库管理 | 所有批量操作支持 `--dry-run` 预览和 `--from CSV` 文件输入。 ## 本小组完整贡献(含已提交的其他改动) 除本 PR 外,我们小组还对以下已有模块进行了增强和修复,相关改动已在 fork 仓库完成: - **issue**: 新增 reopen、batch-reopen、batch-comment 命令;修复 assign 传递数字 ID、保留 status_id 防止状态被重置 - **repo/org**: 修复 batch-invite 用户名自动解析为数字 ID - **watch/star**: 修复 resolveProjectID 兼容 project_id 字段 - **output**: table 输出格式优化,改善中英文混排对齐 - **client**: 新增 DoRaw 方法,支持不带 .json 后缀的网关 API(如 Wiki) - **CI/CD**: 新增 FreeBSD amd64/arm64 构建支持 ## 测试 每个模块包含 httptest mock 单元测试(wiki 12个 + 其他模块 19+个)。 ## 变更说明文档 详见 `doc/changes/new-shortcut-modules.md` ## ⚠️ 注意 本 PR 的代码基于旧版 API 签名 `Shortcuts()` 无参数版本,需适配新版 i18n 翻译器接口 `Shortcuts(tr)` 后方可编译。Wiki 模块依赖 `client.DoRaw()` 方法。如需我方协助适配请告知。
chroe added 1 commit 2026-06-08 12:11:57 +08:00
e2fe4c02f0 feat(shortcuts): add wiki/commit/file/star/watch modules + batch operations
新增 5 个 Shortcut 模块(23 个命令)和 3 个批量操作:

新模块:
- wiki: 5 命令 (list/view/create/update/delete),含 Sidebar 自动清理
- commit: 4 命令 (list/view/diff/blame)
- file: 5 命令 (list/tree/get/create/delete),自动 base64 编码
- star: 3 命令 (star/unstar/stars)
- watch: 3 命令 (watch/unwatch/watchers)

批量操作:
- member batch-add: 批量添加成员
- org batch-invite: 批量邀请(用户名自动解析为 ID)
- repo batch-create/batch-fork/batch-delete: 批量仓库管理
- 所有批量操作支持 --dry-run 和 --from CSV

测试: 每个模块包含 httptest mock 单元测试
文档: doc/changes/new-shortcut-modules.md

Note: 代码基于旧版 API 签名,需适配 i18n 翻译器接口
wbtiger closed this pull request 2026-07-14 23:00:00 +08:00
wbtiger reopened this pull request 2026-07-14 23:03:06 +08:00
wbtiger closed this pull request 2026-07-14 23:07:59 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#147
No description provided.