Commit Graph

76 Commits

Author SHA1 Message Date
wbtiger 67397c2bd4 Merge pull request 'feat(label): add label +clone to copy labels from another repository' (#367) from heke1228/gitlink-cli:feat/label-clone into master 2026-07-14 22:24:49 +08:00
wbtiger 3d3aa39973 Merge pull request 'feat(pr): add pr +status showing pull requests relevant to you' (#369) from heke1228/gitlink-cli:feat/pr-status into master 2026-07-14 22:24:45 +08:00
wbtiger ccac57046a Merge pull request '完善仓库 README 快捷命令' (#122) from Mengz/gitlink-cli:mengz/repo-readme-file-support into master 2026-07-14 22:24:27 +08:00
wbtiger 4431d90e8b Merge pull request 'feat(search): 新增 search +recommend 推荐项目快捷命令' (#250) from luwanzhou/gitlink-cli:feat/search-recommend into master 2026-07-14 22:24:20 +08:00
wbtiger dd3783d998 Merge pull request 'fix(repo): +tree 未指定 --ref 时遵循仓库默认分支(修复 main 默认分支仓库 404)' (#337) from Taoyouce/gitlink-cli:fix/repo-tree-default-branch into master 2026-07-14 22:24:10 +08:00
wbtiger 7ef01a97c1 Merge pull request '新增 shell 自动补全命令' (#134) from Mengz/gitlink-cli:mengz/shell-completion into master 2026-07-14 22:23:07 +08:00
wbtiger a3bddb552c Merge pull request 'fix(workflow): use status/category list filters in health and report fetchers' (#360) from heke1228/gitlink-cli:fix/workflow-health-list-filter into master 2026-07-14 22:22:51 +08:00
wbtiger cc1b055e3f Merge pull request #213: feat(repo): add mirror sync shortcut
# Conflicts:
#	shortcuts/register.go
#	shortcuts/register_test.go
2026-07-14 21:58:06 +08:00
wbtiger a2f8e1a01a Merge pull request #283: feat(pr): 在列表输出中显示 PR 编号
# Conflicts:
#	shortcuts/pr/pr.go
#	shortcuts/pr/pr_test.go
2026-07-14 21:57:59 +08:00
wbtiger 8a60844342 Merge pull request #284: feat(pr): 支持按编号搜索 PR
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 21:57:59 +08:00
wbtiger 7d706f4e4c Merge pull request #406: fix(api): 修复 Windows Git Bash 下 API 路径被 MSYS2 污染导致 404
# Conflicts:
#	cmd/api/api.go
2026-07-14 21:57:33 +08:00
wbtiger 3e64f86816 Merge pull request 'feat(commit): add commit inspection shortcuts' (#206) from wangyue111/gitlink-cli:feat/commit-inspect-shortcuts into master 2026-07-14 20:44:29 +08:00
wbtiger e5cf341d26 Merge pull request 'fix(api): resolve :owner/:repo and --var placeholders in single calls' (#254) from luwanzhou/gitlink-cli:fix/api-owner-repo-placeholders into master 2026-07-14 20:43:55 +08:00
wbtiger 3264c53bcc Merge pull request 'fix(output): deterministic --format table ordering and show error status code' (#258) from luwanzhou/gitlink-cli:fix/output-table-determinism into master 2026-07-14 20:43:51 +08:00
wbtiger e448f383ee Merge pull request 'feat(member): add application shortcuts' (#267) from wangyue111/gitlink-cli:feat/member-application-shortcuts into master 2026-07-14 20:43:47 +08:00
wbtiger b44eaa220e Merge pull request 'fix(output): --format table 支持资源包裹列表响应(此前 list 命令表格从不生效)' (#343) from Taoyouce/gitlink-cli:feat/table-list-rendering into master 2026-07-14 20:43:38 +08:00
wbtiger 2d8ff0d227 Merge pull request 'fix(label): paginate label lookup in +update to avoid clobbering fields' (#363) from heke1228/gitlink-cli:fix/label-update-pagination into master 2026-07-14 20:43:30 +08:00
wbtiger 177f9082d8 Merge pull request 'feat(issue): 新增 batch-reopen / batch-comment 批量操作' (#407) from chroe/gitlink-cli:feat/issue-batch-reopen-comment into master 2026-07-14 20:43:19 +08:00
wbtiger b45ff6af88 Merge pull request 'feat(issue): add issue +reopen to reopen a closed issue' (#362) from heke1228/gitlink-cli:feat/issue-reopen into master 2026-07-14 20:40:58 +08:00
wbtiger 4b435b0bf9 Merge pull request 'fix(i18n): add missing cmd.ignore.short group description key' (#364) from heke1228/gitlink-cli:fix/ignore-i18n-key into master 2026-07-14 20:40:53 +08:00
wbtiger 2c64b80f4c Merge pull request 'feat(repo): add repo +rename to rename the current repository' (#368) from heke1228/gitlink-cli:feat/repo-rename into master 2026-07-14 20:40:49 +08:00
wbtiger 01ebb4e656 Merge pull request 'feat(ignore): add ignore template shortcuts' (#202) from wangyue111/gitlink-cli:feat/ignore-template-shortcuts into master 2026-07-14 20:39:50 +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 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
林晨 (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) 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) 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) 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
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
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
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 4c23b8f180 feat(member): add application shortcuts 2026-06-22 12:30:16 +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