feat(commit): add commit inspection shortcuts #206

Merged
wbtiger merged 1 commits from wangyue111/gitlink-cli:feat/commit-inspect-shortcuts into master 2026-07-14 20:44:44 +08:00
Contributor

背景

代码审查和仓库复现经常需要查看提交列表、单个提交变更文件、完整 diff 和 blame 信息。OpenAPI 已有对应接口,但 CLI 目前缺少统一 Shortcut,Agent 只能通过 Raw API 手动拼路径。

新增功能

新增 gitlink-cli commit 命令组:

  • commit +list:提交列表,支持 --sha --page --limit
  • commit +files:单个 commit 的变更文件,支持 --filepath
  • commit +diff:单个 commit 的 diff 信息
  • commit +blame:单个文件 blame,支持 branch/tag/commit sha

OpenAPI 对齐

  • GET /v1/{owner}/{repo}/commits
  • GET /v1/{owner}/{repo}/commits/{sha}/files
  • GET /v1/{owner}/{repo}/commits/{sha}/diff
  • GET /v1/{owner}/{repo}/blame

价值

全部命令只读,适合 PR Review、变更追踪、科研仓库复现、代码归因和 Agent 预检。

测试

git diff --check
GOPROXY=https://goproxy.cn,direct go test ./shortcuts/commit ./shortcuts
go vet ./shortcuts/commit ./shortcuts
go run . commit --help
GOPROXY=https://goproxy.cn,direct go test ./...
go vet ./...

文档

更新 README / README.zh-CN / skills/README,新增 skills/gitlink-commit/SKILL.mddoc/changes/commit-inspect-shortcuts.md

## 背景 代码审查和仓库复现经常需要查看提交列表、单个提交变更文件、完整 diff 和 blame 信息。OpenAPI 已有对应接口,但 CLI 目前缺少统一 Shortcut,Agent 只能通过 Raw API 手动拼路径。 ## 新增功能 新增 `gitlink-cli commit` 命令组: - `commit +list`:提交列表,支持 `--sha --page --limit` - `commit +files`:单个 commit 的变更文件,支持 `--filepath` - `commit +diff`:单个 commit 的 diff 信息 - `commit +blame`:单个文件 blame,支持 branch/tag/commit sha ## OpenAPI 对齐 - `GET /v1/{owner}/{repo}/commits` - `GET /v1/{owner}/{repo}/commits/{sha}/files` - `GET /v1/{owner}/{repo}/commits/{sha}/diff` - `GET /v1/{owner}/{repo}/blame` ## 价值 全部命令只读,适合 PR Review、变更追踪、科研仓库复现、代码归因和 Agent 预检。 ## 测试 ```bash git diff --check GOPROXY=https://goproxy.cn,direct go test ./shortcuts/commit ./shortcuts go vet ./shortcuts/commit ./shortcuts go run . commit --help GOPROXY=https://goproxy.cn,direct go test ./... go vet ./... ``` ## 文档 更新 README / README.zh-CN / skills/README,新增 `skills/gitlink-commit/SKILL.md` 和 `doc/changes/commit-inspect-shortcuts.md`。
wangyue111 force-pushed feat/commit-inspect-shortcuts from 5afd2f46b7 to 79fb167218 2026-06-14 23:43:06 +08:00 Compare
wangyue111 force-pushed feat/commit-inspect-shortcuts from 79fb167218 to 049927305c 2026-06-16 08:20:55 +08:00 Compare
wangyue111 force-pushed feat/commit-inspect-shortcuts from 049927305c to 0e149b3cbe 2026-06-23 19:51:36 +08:00 Compare
wbtiger merged commit 3e64f86816 into master 2026-07-14 20:44:30 +08:00
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#206
No description provided.