wbtiger
6148be40da
fix(api): restore resolveAPIPath after MSYS2 merge conflict resolution
...
The merge of PR #406 (MSYS2 path fix) via --theirs accidentally
dropped the resolveAPIPath function added by PR #254 . This commit
restores the :owner/:repo placeholder and --var template resolution
while keeping the MSYS2 path restoration as the first step.
2026-07-14 22:03:17 +08:00
chroe
bf9ecc4ba2
docs(api): add MSYS2 path fix doc; extract restoreAPIPath for testability
...
- 新增命令帮助文档 doc/changes/api-msys2-path.md(问题/根因/修复/影响/测试)。
- 将 runAPI 内联的路径还原逻辑抽成纯函数 restoreAPIPath,便于单元测试;
并修正一个边界缺陷:路径含多个已知前缀时(如 /api/v1/users)改为取
最早出现的位置,避免误截到 /v1/。
- 新增表驱动 TestRestoreAPIPath 覆盖:正常路径不变、v1/v2/api 污染还原、
无已知前缀保留、空路径。
2026-07-09 22:27:52 +08:00
chroe
b0424aa6d8
fix(api): restore API path polluted by MSYS2/Git Bash on Windows
...
在 Windows Git Bash (MSYS2) 环境下,gitlink-cli api GET /v1/owner/repo
的路径参数会被 MSYS2 自动改写为类似
C:/Program Files/Git/v1/owner/repo 的 Windows 路径(MSYS2 把 /v1
当成 Unix 路径转换为 Git 安装目录),导致 API 调用 404。
修复:在 runAPI 中检测路径首部是否为盘符(^[A-Za-z]:/),
若是则按常见 API 前缀(/v1/ /v2/ /api/ /users/ /projects/)
定位并还原原始 API 路径。
影响所有 Windows Git Bash 用户,跨平台兼容性修复。
2026-07-09 21:41:29 +08:00
Mengz
35e50a1828
feat: 新增 Raw API 批处理执行器
2026-06-06 11:55:20 +08:00
whzy
37dfd2e2e2
feat(i18n): add CLI localization foundation
2026-06-01 17:33:10 +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
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
e892370de8
init gitlink-cli
2026-04-17 10:01:30 +08:00