whale
|
e3c1952826
|
Merge cuijiaxiang23: Wiki + PM + Webhook + Issue batch
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-01 11:51:54 +08:00 |
whale
|
2b0ee1be6f
|
feat: add Wiki, PM kanban, Webhook shortcuts + Issue batch operations
Wiki (5 commands):
- wiki +list/+view/+create/+update/+delete
- Uses gateway.gitlink.org.cn API gateway
- JSON body with owner/repo params, auto base64 encoding
PM/Kanban (6 commands):
- pm +boards/+sprints/+weekly/+tags/+pipelines/+actions
- Shared listPM helper to reduce duplication
Webhook (4 new commands + bugfix):
- webhook +view/+update/+history/+test
- Fixed create missing http_method field
Issue batch (3 commands):
- issue +batch-update/+batch-delete/+batch-close
- Dry-run safety + CSV file support
Infrastructure:
- Added DoForm/CallAPIRawForm for form-encoded bodies
- Added DecodeForm test utility
- All 39 tests passing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-01 11:38:55 +08:00 |
Surponess
|
3b75aca287
|
代码片段管理功能
7 个命令
命令 用途 关键参数
create 创建片段 --title(必填)、--language、--tags、--content(支持 stdin)
list 列出片段 --tag、--language、--keyword(可选过滤)
view 查看详情 --id(必填)
search 全文搜索 --query(必填)
update 更新片段 --id(必填)+ 至少一个字段
delete 删除片段 --id(必填)
export 导出到文件 --id(必填)、--output
|
2026-06-01 10:48:50 +08:00 |
Surponess
|
4176555d37
|
变更文件清单
1. shortcuts/pr/pr.go — 核心逻辑
+diff 命令替换:
旧实现:与 +files 完全相同,调用 /pulls/{id}/files(只返回文件列表)
新实现:两步调用
GET /v1/{owner}/{repo}/pulls/{id}/versions → 取最新版本 ID
GET /v1/{owner}/{repo}/pulls/{id}/versions/{version_id}/diff → 获取逐行 diff
新增参数:
--file / -f — 过滤特定文件的 diff
--stat — 仅显示统计摘要
新增函数:
getLatestVersionID() — 获取 PR 最新版本 ID
formatDiffStat() — 提取增删统计摘要
2. internal/output/formatter.go — Diff 渲染
isDiffData() — 通过检测 files[].sections 区分 diff 数据和普通文件列表
printDiffTable() — 以 git diff 风格渲染:diff --git 头、hunk header、增删行
修改 printTable() 路由,自动检测并走 diff 渲染分支
3. shortcuts/pr/pr_test.go — 新增 5 个测试
测试用例 验证内容
TestPRDiffFetchesVersionThenDiff 两步调用完整流程
TestPRDiffWithFileFilter --file 参数传递 filepath 查询参数
TestPRDiffStatMode --stat 模式只输出统计
TestPRDiffFailsWhenNoVersions 无版本时返回友好错误
TestPRDiffFailsWhenPRNotFound PR 不存在时正确处理 404
4. Skill 文档更新
SKILL.md — 更新 +diff 描述、新增使用示例、更新注意事项
gitlink-pr-files.md — 完整重写,明确 +files 和 +diff 的区别
|
2026-05-25 11:36:49 +08:00 |
wbtiger
|
e892370de8
|
init gitlink-cli
|
2026-04-17 10:01:30 +08:00 |