whale
8176d8854c
Merge remote-tracking branch 'origin/master' into master
...
- 保留本地 Wiki shortcuts 完整实现(含 sidebar/目录管理)
- 合并 client.go:保留 DoRaw/DoForm,增加 gateway 错误码与 wiki/open 免 .json 后缀处理
- 更新 register_test.go 以校验 25 个命令域(含 pm/wiki/file/snippet)
- 移除与本地 issue batch 测试冲突的 origin batch_update_test.go
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-02 16:08:43 +08:00
co63oc
2c9a8b6192
feat(shortcut): add shortcuts/wiki
2026-06-16 10:24:15 +08:00
wauxing
fbdab04a57
refactor(i18n): fork 引入的命令全面 i18n 化,对齐 upstream 风格
...
仅改造 fork 自己实现/新增的命令,不动 upstream 本身未 i18n 的包:
- issue/batch_*.go(7文件): newBatchXxxShortcut 接受 tr,所有
Description/Usage 改 tr.T();新增 batchRuntimeFlags(tr) 共享 helper
消除 dry-run/confirm/max/delay 重复
- search +issues: 11 个硬编码改 tr.T(),复用 flag.search.keyword/
flag.page/flag.limit/flag.sort_by/flag.sort_direction
- user headmaps/stats-*/trends: newStatsShortcut 接受 tr,
Description/Usage 改 tr.T()
- locale: 新增 51 个 key(zh-CN + en-US 双语),清理 10 个孤立死 key
(batch_list.*/batch.reason/yes 等无对应命令的遗留 key)
全模块测试通过(40 包,0 失败)。
2026-06-15 17:28:21 +08:00
wauxing
ca2431f05b
Merge remote-tracking branch 'upstream/master' into baoerjun_branch
...
# Conflicts:
# shortcuts/issue/issue.go
# shortcuts/register.go
# shortcuts/release/release.go
# shortcuts/release/release_test.go
# shortcuts/repo/repo_test.go
# skills/README.md
# skills/gitlink-onboarding/SKILL.md
# skills/gitlink-pr/SKILL.md
# skills/gitlink-repo/SKILL.md
# skills/gitlink-search/SKILL.md
2026-06-15 11:15:43 +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
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
NeeNe
a580562922
chore: 打磨仓库文件树命令文档和国际化
2026-06-08 11:51: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
wbtiger
7e863398aa
Merge pull request '新增 CLI 自诊断命令' ( #132 ) from Mengz/gitlink-cli:mengz/doctor-command into master
2026-06-08 02:19:54 +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
whale
0efb085bf3
merge: sync with upstream, keep our changes
2026-06-04 08:31:35 +08:00
whzy
f4820c03b4
fix(i18n): align schema and gosec annotation
2026-06-03 13:43:56 +08:00
whzy
39306994bc
fix(i18n): align schema and check tool lint
2026-06-02 14:59:59 +08:00
whzy
37dfd2e2e2
feat(i18n): add CLI localization foundation
2026-06-01 17:33:10 +08:00
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
wbtiger
902886cabd
Merge pull request 'fix: preserve raw file API paths' ( #85 ) from dtwdtw/gitlink-cli:fix/issue-142586-raw-file-api into master
2026-06-01 01:04:25 +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
wbtiger
f7263cc466
chore: add golangci-lint config and fix lint issues
...
- Add .golangci.yml with 8 essential linters (errcheck, govet,
ineffassign, staticcheck, unused, errorlint, gosec, misspell)
- Fix real bugs: errors.As, %w wrapping, nil map check, dead code,
unnecessary conversion, unused parameters
- Add `make lint` target, include it in `make check` pipeline
- Update pre-commit hook to run lint step
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 00:37:45 +08:00
fsafasff
c28b72d46f
fix: preserve raw file API paths
2026-05-29 11:41:10 +08:00
wbtiger
36249f3087
feat: add PR closed time and repo README shortcuts ( #49 , #52 )
...
PR #49 (dtwdtw): enrich PR view with closed_at from issue journals
- Fetches close timestamp for closed/rejected PRs
- Skips extra API call for open PRs
- 2 new tests
PR #52 (dtwdtw): add repo +readme shortcut
- Fetches README content with optional --ref and --path params
- normalizeAPIPath prevents duplicate /api prefix in client
- 4 new tests (3 client + 1 repo)
Co-authored-by: dtwdtw <dtwdtw>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 00:35:31 +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