Commit Graph

129 Commits

Author SHA1 Message Date
chroe f986634498 feat(issue): add batch-reopen and batch-comment shortcuts
在现有 batch-close/update/delete 基础上补全 Issue 批量操作:

- issue +batch-reopen  批量重新打开已关闭的 Issue
- issue +batch-comment 批量为多个 Issue 添加评论

两者均复用现有批量基础设施(collectIssueNumbers / parseBool /
fetchExistingIssue / batchCloseSummary),支持 --numbers、--from CSV、
--dry-run 预演,与 batch-close 行为一致。

reopenIssue 复用 fetchExistingIssue 保留 subject/description 后将
status_id 置为 openIssueStatusID(1);commentIssue 向
/v1/.../issues/{n}/journals POST notes。

含单元测试(dry-run 路径 + 必填参数校验)。
2026-07-09 22:13:52 +08:00
wyxfzgg eb5710bffb feat(shortcut): add capability command group + internal/capability (后端能力探测)
新增 capability 命令组 + internal/capability 包,探测 GitLink 后端各模块 API 是否就绪:

- capability +check  探测后端能力,结果缓存 24h
- capability +list   查看已缓存结果

新增 internal/capability 包:Registry 记录各域(label/notification/pm/wiki/pipeline/webhook/member/milestone/export/search/workflow)的可用状态,复用 internal/client 探测,支持 200/401/403/404 与 HTML 响应判定。
含完整单元测试、帮助文档、变更说明。register.go 仅普通注册(3行),不改其他模块渲染。
来源:GitLink 大赛 2026 子赛题一。
2026-07-09 22:05:53 +08:00
wyxfzgg 1527f45dc1 feat(shortcut): add notification command group (list/read/read-all/watch)
新增 notification 命令组,封装 GitLink 通知 OpenAPI:

- notification +list     列出通知(--all/--participating/分页)
- notification +read     标记单条已读 (-i/--id)
- notification +read-all 全部标记已读
- notification +watch    关注/取消关注仓库通知 (-o/-r, --unwatch)

含单元测试(7 测试,覆盖 method/path/query)、帮助文档、变更说明。
来源:GitLink 大赛 2026 子赛题一。
2026-07-09 21:24:06 +08:00
wyxfzgg 26a8d15c15 feat(shortcut): add pm command group (project management)
新增 pm 命令组,补齐 GitLink 项目管理后端的命令化访问:

- pm +dashboards  查看项目仪表盘数据
- pm +sprints     查看 Sprint 任务列表
- pm +weekly      查看周报任务
- pm +tags        查看项目 Issue 标签
- pm +pipelines   查看项目 CI/CD 流水线列表
- pm +runs        查看项目 Action 运行记录

全部只读(GET),统一 owner/repo 自动解析与 --format json|table|yaml。
含单元测试、帮助文档 doc/commands/pm.md、变更说明 doc/changes/pm-shortcut.md。

来源:GitLink 大赛 2026 子赛题一。
2026-07-09 21:21:45 +08:00
wyxfzgg d33c3c9316 feat(shortcut): add export command group (issues/prs/contributors → CSV/JSON)
新增 export 命令组,将仓库数据导出为 CSV/JSON 文件,支撑离线分析与科研数据抽取:

- export +issues    导出 Issue 列表 (GET /v1/:owner/:repo/issues)
- export +prs       导出 PR 列表 (GET /v1/:owner/:repo/pulls)
- export +contributors 导出贡献者统计 (GET /:owner/:repo/contributors)

统一 --format csv|json 与 --output,issues/prs 支持 --state 过滤与分页。
含单元测试(HTTP 方法/路径/参数/CSV·JSON 写入,6 测试)、
帮助文档 doc/commands/export.md、变更说明 doc/changes/export-shortcut.md。

背景:此前仓库数据导出只能手工拼 Raw API;export 组将其提升为一等命令。
来源:GitLink 大赛 2026 子赛题一。
2026-07-09 21:18:25 +08:00
林晨 (Leo Cheng) 1d81396bab
feat(alias): add alias command group with quote-aware expansion
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:43 +08:00
林晨 (Leo Cheng) ceb34d2104
feat(pr): add pr +status showing pull requests relevant to you
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:42 +08:00
林晨 (Leo Cheng) 41d2f5bbb0
feat(repo): add repo +rename to rename the current repository
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:41 +08:00
林晨 (Leo Cheng) 5511d492cb
feat(api): add --paginate and unwrap GitLink list responses in PaginateAll
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:33 +08:00
林晨 (Leo Cheng) 44d2ba0db2
feat(label): add label +clone to copy labels from another repository
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:33 +08:00
林晨 (Leo Cheng) c4a0ac1f13
feat(pr): surface merged_at in pr +view
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:32 +08:00
林晨 (Leo Cheng) 6ae52f40f7
fix(label): paginate label lookup in +update to avoid clobbering fields
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:48 +08:00
林晨 (Leo Cheng) 6e71ff9941
feat(pr): add pr +edit to update an open pull request
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:47 +08:00
林晨 (Leo Cheng) 8f5cc1637d
feat(issue): add issue +reopen to reopen a closed issue
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:47 +08:00
林晨 (Leo Cheng) e4b03e0053
fix(workflow): use status/category list filters in health and report fetchers
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:46 +08:00
林晨 (Leo Cheng) 17ec98f198
fix(i18n): add missing cmd.ignore.short group description key
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:33 +08:00
林晨 (Leo Cheng) 50bcf5bf68
feat(browse): add browse shortcut group to open repo pages in a browser
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 03:06:54 +08:00
Mengz 5c16a4a70e feat: 新增 shell 自动补全命令 2026-07-07 14:52:28 +08:00
laurencewannamaker 95a8a37876 fix(output): --format table 支持资源包裹列表响应(此前 list 命令表格从不生效)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:29:15 +00:00
laurencewannamaker 4913cf5319 fix(output): 全局提取 flag 改名 --jq,避免与 api 子命令 --query(查询参数)语义冲突
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:26:07 +00:00
laurencewannamaker 497bd6a071 feat(output): 全局 --query/-q 点分路径输出字段提取(零依赖,对标 gh --jq)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 23:22:03 +00:00
farmyobutu5233 2dd580c208 fix: branch/pr/release default-branch awareness (drop hardcoded master)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 12:35:16 +00:00
farmyobutu5233 fcde26823b fix(repo): +tree respects repository default branch when --ref omitted
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 12:27:01 +00:00
farmyobutu5233 f43afa75a6 fix(milestone): make +create --description/--due-date optional to match platform API
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-05 12:06:21 +00:00
NeeNe 80f56e8d71 feat(workflow): replace raw api calls with shortcut-backed fetches 2026-07-03 11:28:52 +08:00
NeeNe 906bdb9d6d feat(org): add organization team shortcuts 2026-07-03 10:17:42 +08:00
NeeNe 0806f3096c feat(ci): add repository CI control shortcuts 2026-07-02 13:30:28 +08:00
Mengz c3dc86511d feat(pr): 增加行级审查评论快捷命令 2026-07-01 11:44:03 +08:00
Mengz 898af8cd80 feat: 新增 Release 资产下载命令 2026-07-01 11:44:03 +08:00
Mengz 6cebb6fbf9 feat(compare): 新增 compare 汇总与提交筛选命令 2026-07-01 11:44:03 +08:00
Mengz d408443c84 feat(repo): 增加读取仓库任意文件的 +file 命令 2026-06-26 15:37:21 +08:00
weidongde 7f7f24d5fb feat(release): add latest and auto-notes shortcuts
添加两个新的 Release 相关命令:

1. release +latest: 获取最新发布版本
   - 默认跳过草稿和预发布版本
   - 支持 --include-prerelease 和 --include-draft 参数

2. release +auto-notes: 自动生成 Release Notes
   - 根据提交信息自动分类(feat/fix/其他)
   - 包含已关闭的 Issue 列表
   - 支持 --from-tag 指定起始标签
   - 支持 JSON 格式输出统计信息

包含完整的单元测试和文档更新。
2026-06-26 15:22:41 +08:00
co63oc fa956dcd92 feat(pr): add --login flag to filter list by issue author 2026-06-26 09:16:01 +08:00
Mengz c9aea1d983 feat(pr): 在列表中显示 PR 编号 2026-06-25 18:13:39 +08:00
Mengz ffb35a4f02 feat(pr): 支持按编号搜索 PR 2026-06-25 18:13:39 +08:00
wangyue789 4a263c1ec0 feat(repo): add mirror sync shortcut 2026-06-23 19:52:37 +08:00
wangyue789 0e149b3cbe feat(commit): add commit inspection shortcuts 2026-06-23 19:52:08 +08:00
wangyue789 58982c2bb0 feat(user): add statistics shortcuts 2026-06-22 12:32:58 +08:00
wangyue789 4c23b8f180 feat(member): add application shortcuts 2026-06-22 12:30:16 +08:00
Mengz 9bf0258b43 feat(repo): 增强仓库转移快捷命令安全保护 2026-06-22 12:27:37 +08:00
Mengz e9936734ee feat: 新增仓库转移快捷命令 2026-06-22 12:27:37 +08:00
Mengz cf7dab27af feat(message-settings): 增加消息通知设置快捷命令 2026-06-22 11:17:07 +08:00
co63oc 2c9a8b6192 feat(shortcut): add shortcuts/wiki 2026-06-16 10:24:15 +08:00
wangyue789 bc64e59bd2 feat(ignore): add ignore template shortcuts 2026-06-16 08:21:27 +08:00
luwanzhou 2f4b7674d6 fix(output): deterministic --format table ordering and show error status code
--format table 的渲染依赖 Go map 随机遍历顺序:printMapTable 的行顺序、
以及 collectKeys 补全非优先列后 printSliceTable 的列顺序,每次运行都可能不同,
导致同一命令两次输出不一致,难以对比/diff/脚本断言。

- collectKeys:优先列之后的剩余列改为 sort.Strings 排序,顺序稳定可预期。
- printMapTable:按 collectKeys 顺序输出,行序确定且与列表表列序一致。
- 错误输出:有错误码时显示 Error [<code>]: <message>,便于区分 404/422/500。

仅稳定 table 呈现顺序并丰富错误提示,不影响 json/yaml 输出与成功数据内容。
新增单测覆盖排序、25 次渲染确定性、错误码展示。
2026-06-15 12:59:23 +08:00
luwanzhou 81d30d6741 fix(api): resolve :owner/:repo and --var placeholders in single calls
gitlink-cli api <METHOD> <PATH> 单次调用此前直接发送原始路径,不替换
REST 风格的 :owner/:repo 占位符——导致该命令自身的 Example
(api POST /:owner/:repo/issues)以及依赖该写法的 Skill/文档无法使用。

- 新增 resolveAPIPath:先按 --var 渲染 {{var}} 模板(复用批处理模板引擎),
  再用 context.ResolveOwnerRepo(--owner/--repo → git remote,与所有 shortcut
  一致)替换 :owner/:repo,最后补全前导 /。
- :owner/:repo 正则用 \b 边界避免误伤 :owner_id;ReplaceAllLiteralString
  避免 owner/repo 中的 $ 被当作正则替换引用。
- 不含占位符且无 --var 的调用行为不变。
- 更新命令 Example;新增单元测试(占位符解析、单次 --var 渲染、缺失变量报错)。

修复 Issue: api 命令单次调用不替换 :owner/:repo 占位符。
2026-06-15 12:36:58 +08:00
wangyue789 0703d3eba9 feat(issue): add batch maintenance shortcuts 2026-06-15 08:21:10 +08:00
luwanzhou e5cb868442 feat(search): add recommended projects shortcut
Add `search +recommend`, listing the platform's recommended/featured
projects via GET /api/projects/recommend — a discovery endpoint that had
no shortcut coverage. The endpoint returns a bare JSON array; the command
normalizes it into structured data for clean output.

Includes unit tests, bilingual (en-US/zh-CN) help text, README updates,
and a change note. Verified against production gitlink.org.cn.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 01:42:15 +08:00
Tiger ecc5578cf4 Merge upstream/master: resolve conflicts in README.zh-CN.md and register_test.go
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 18:50:50 +08:00
wbtiger 8c29d98a57 Merge pull request 'feat(profile): 新增用户画像统计快捷命令' (#241) from luwanzhou/gitlink-cli:feat/profile-shortcuts into master 2026-06-14 18:32:04 +08:00
luwanzhou 29ca94db76 feat(dataset): add full dataset CRUD (view/create/update/delete-attachment)
Extend the dataset group beyond the verified project query to the full
documented contract:

- dataset +view              -> GET    /v1/{owner}/{repo}/dataset (+page/limit)
- dataset +list --ids        -> GET    /v1/project_datasets   (prod-verified)
- dataset +create            -> POST   /v1/{owner}/{repo}/dataset
- dataset +update            -> PUT    /v1/{owner}/{repo}/dataset
- dataset +delete-attachment -> DELETE /attachments/{uuid}

Quality over a bare contract port: bilingual (en-US/zh-CN) i18n help,
--dry-run preview on create/update, --yes confirmation guard on the
destructive attachment delete, and license-id validation.

Only /v1/project_datasets is currently reachable on production www; the
per-repo routes follow the published OpenAPI spec and return 404 there
until the platform deploys them (documented in the change note). Unit
tests exercise every command against a mock server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 14:01:57 +08:00
luwanzhou 7f731eb04f feat(dataset): add dataset query shortcuts
Add a `dataset` shortcut group for querying GitLink research datasets,
which previously had no shortcut coverage:

- dataset +list --ids <ids>  -> GET /v1/project_datasets
- dataset +view              -> GET /v1/project_datasets (project ID
                                 resolved from --owner/--repo)

Only the platform-wide query endpoint is available on production
gitlink.org.cn; the documented per-repo dataset CRUD routes return 404
there (verified against the API), so this group wraps the query endpoint
for both listing and per-repo viewing.

Includes unit tests, bilingual (en-US/zh-CN) i18n help text, README
updates, and a change note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 11:48:22 +08:00
luwanzhou da4c8c0d10 feat(profile): 新增用户画像统计快捷命令
新增只读 profile 命令组,封装此前无 shortcut 覆盖的
GitLink 用户画像统计接口:

profile +ability      -> /users/{user}/statistics/develop
profile +role         -> /users/{user}/statistics/role
profile +major        -> /users/{user}/statistics/major
profile +activity     -> /users/{user}/statistics/activity
profile +contribution -> /users/{user}/headmaps

省略 --user 时默认通过 /users/me 解析当前认证用户。
统计命令支持 --start-time/--end-time 时间窗口,
+contribution 支持 --year 参数。

包含单元测试、中英双语 i18n 帮助文本、README 更新
及变更说明文档。
2026-06-13 23:07:27 +08:00
Mengz 0a5bad01c8 fix(issue): 修复详情缺失并保护更新元数据 2026-06-10 19:33:56 +08:00
Mengz 245a3d52d7 fix: 完善仓库 README 快捷命令 2026-06-09 12:51:08 +08:00
co63oc 17c555620b feat(shortcut): add shortcuts/ignore 2026-06-09 08:50:39 +08:00
wbtiger 462ae7b012 Merge pull request 'feat(repo): 新增 repo +tree 文件树查询命令' (#143) from ohanabi/gitlink-cli:feat/repo-tree-shortcut-final into master 2026-06-09 01:18:09 +08:00
NeeNe 21ebb2f89c chore: 打磨仓库文件树命令交付质量 2026-06-08 12:13:28 +08:00
chroe 29d1b356b4 feat: add Showcase Dashboard - interactive web demo
新增 GitLink CLI Showcase Dashboard:
- Go HTTP 服务器 + 暗色主题前端页面
- 12 个模块卡片,支持在线执行 CLI 命令
- Dockerfile 多阶段构建,一键容器化部署
- GitLink DevOps 流水线配置

文件: showcase/main.go, index.html, Dockerfile, deploy.sh, pipeline.yml
文档: doc/changes/showcase-dashboard.md
2026-06-08 12:00:12 +08:00
NeeNe 0da1d8d7bf docs: 补充仓库文件树命令变更说明 2026-06-08 11:55:09 +08:00
wangyue789 2d963ebf41 feat(release): add edit and update shortcuts 2026-06-08 08:30:21 +08:00
wbtiger 27cc58328d Merge pull request 'feat(repo): add insight shortcuts' (#59) from wangyue111/gitlink-cli:feat/repo-insight-shortcuts into master 2026-06-08 02:32:26 +08:00
wbtiger ca578a74be Merge pull request 'feat(repo): add settings and topic shortcuts' (#71) from wangyue111/gitlink-cli:feat/repo-settings-shortcuts into master 2026-06-08 02:26:54 +08:00
wbtiger dd4ed35448 Merge pull request '修正 Issue 和 PR 列表筛选' (#117) from Mengz/gitlink-cli:mengz/list-filter-fixes into master 2026-06-08 02:24:41 +08:00
wbtiger 723e698db4 Merge pull request '新增 Raw API 批处理执行器' (#124) from Mengz/gitlink-cli:mengz/api-batch-runner into master 2026-06-08 02:24:14 +08:00
wbtiger 03a9d7a942 Merge pull request '修复认证凭据 fallback 配置目录不一致' (#133) from Mengz/gitlink-cli:mengz/auth-config-dir-fallback into master 2026-06-08 02:23:06 +08:00
Mengz d6321e7af5 fix: 统一认证凭据 fallback 配置目录 2026-06-06 18:42:50 +08:00
Mengz dec10afaeb feat: 新增 CLI 自诊断命令 2026-06-06 18:11:45 +08:00
Mengz 35e50a1828 feat: 新增 Raw API 批处理执行器 2026-06-06 11:55:20 +08:00
Mengz 0b48ec90d8 fix: 修正 Issue 和 PR 列表筛选 2026-06-05 11:43:30 +08:00
wangyue789 9bfa59c7e8 feat(repo): add settings and topic shortcuts 2026-06-04 07:19:08 +08:00
wangyue789 cedd8b6263 feat(repo): add insight and interaction shortcuts 2026-06-04 07:17:13 +08:00
wangyue789 89d5321713 feat(issue): support metadata fields and id alias 2026-06-02 12:42:34 +08:00
wbtiger fb847bf13f Merge remote-tracking branch 'wangyue111/feat/pipeline-openapi-shortcuts' into _test_68_int 2026-06-01 01:17:23 +08:00
何开元 cca3d019fe feat(label): add issue label shortcuts
Add a `label` shortcut group wrapping the GitLink issue_tags (项目标记) API
with +list / +create / +update / +delete, plus the gitlink-label Skill,
bilingual README usage, and a changelog entry.

- +list supports keyword filter, only-name, and sort options
- +create defaults color to #1E90FF and validates hex client-side
- +update fetches current values and merges, preserving unspecified fields
- unit tests cover HTTP method, path, query, payload, color validation, id coercion
- ignore the local `gitlink-cli` build artifact (.gitignore previously only
  ignored the Windows .exe)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 06:38:39 -07:00
wangyue789 41a2666c5b feat(pipeline): add OpenAPI shortcuts 2026-05-27 22:20:18 +08:00
wbtiger 898b7f59d1 feat: add milestone, compare, pr reopen shortcuts and api enhancements (#45)
- milestone shortcuts: list, create, view, update, delete, close, reopen
- compare shortcuts: view, files (compare branches/tags/commits)
- pr +reopen: reopen closed pull requests
- api: add --body-file and --body-stdin for reading JSON from file/stdin
- comprehensive tests for all new shortcuts

Co-authored-by: wangyue111 <wangyue111>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 00:44:39 +08:00
wbtiger 7bcba5aed8 feat(member): add repository member shortcuts (#46)
Add member command group with 8 shortcuts:
- +list, +add, +batch-add, +remove, +role
- +invite-link, +invite-info, +accept-invite

Batch add supports --dry-run, CSV file input, and partial failure
reporting. 12 tests included.

Co-authored-by: Jiachen Li (puygob236) <noreply@gitlink.org.cn>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 00:24:15 +08:00
Mengz 2f84f3c62e docs: finalize webhook shortcut docs 2026-05-19 15:54:31 +08:00