Commit Graph

126 Commits

Author SHA1 Message Date
15972095207 3ee64a941c 测试流水线 2026-06-04 14:53:40 +08:00
15972095207 ecc6bcca2b fix: use correct API endpoint for notification delete
DELETE /users/{owner}/messages with {type, ids} body,
not DELETE on individual message path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 10:16:50 +08:00
15972095207 97ddd456dd fix: add type field to notification read request body
API requires both type and ids fields for marking notifications as read.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:44:48 +08:00
15972095207 49415faf54 fix: use correct API endpoint for notification read
GitLink uses POST /users/{owner}/messages/read with ids array,
not PATCH on individual message. Fixed code and test accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:42:26 +08:00
15972095207 97f9f63645 fix: use --label clear to remove labels from issue
Empty string doesn't work as CLI flag value. Use 'clear' keyword instead:
- --label 327264,327265  set labels
- --label clear          remove all labels

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:12:44 +08:00
15972095207 c8b4eb2ea0 feat: add --label support to issue update command
Support setting or clearing labels on existing issues:
- --label 327264,327265  set labels
- --label ""            clear all labels

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:10:15 +08:00
15972095207 ed7a2bbcd6 feat: support multiple labels in issue create (--label id1,id2)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 08:59:33 +08:00
15972095207 7f53548244 fix: use correct issue_tag_ids field for issue create --label
The GitLink v1 API expects issue_tag_ids (array of integers), not label_id.
This fixes the bug where --label was silently ignored when creating issues.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 08:50:37 +08:00
15972095207 2760c47115 fix: use PUT method for wiki update and align with reference implementation
The update API requires PUT, not POST. Previous commit 7a85c6d incorrectly
changed it to POST which caused HTTP 500 errors. Also added shared test
helpers to common package and rewrote wiki tests to match reference files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:46:34 +08:00
15972095207 7a82eef766 fix: always include message field in wiki update request body
The gateway API requires the message field to be present (even as empty
string). Previously update omitted it when --message was not provided,
causing HTTP 500 errors. Also removed dead code in callWikiAPI and added
a test for update without message.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:08:54 +08:00
15972095207 7a85c6df88 fix: use POST instead of PUT for wiki update (gateway compatibility) 2026-06-03 20:59:37 +08:00
15972095207 114aed603b fix: omit empty message field in wiki update to avoid 500 error 2026-06-03 20:46:01 +08:00
15972095207 5cb6ea1cd1 fix: wiki commands use correct gateway API (gateway.gitlink.org.cn) 2026-06-03 20:27:19 +08:00
ZxR d3bdbbc28a Merge branch 'master' of https://gitlink.org.cn/ylly/gitlink-cli 2026-06-02 16:02:12 +08:00
ZxR 1c6cb6ae9c fix: update label tests to match corrected API path 2026-06-02 16:01:00 +08:00
zhangqing 263c20801a fix: update notification test paths to include .json suffix
The HTTP client automatically appends .json to API paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-02 15:24:15 +08:00
zhangqing dee04432d2 fix: use ctx.Owner instead of global cmdutil.Owner in notification
Tests set Owner on RuntimeContext, not on the global cmdutil variable.
This fixes all 4 notification test failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-02 15:21:12 +08:00
zhangqing 1e32e12145 feat: add notification module + fix issue --label bug
- Add notification +list, +view, +read, +delete commands
- Add notification unit tests
- Register notification module in register.go
- Fix issue +create ignoring --label flag

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-02 15:08:53 +08:00
ZxR e53c92be46 fix: correct label API path to /{owner}/{repo}/labels 2026-06-02 11:48:20 +08:00
ZxR 67f8068e3e 增加label 标签管理 2026-06-02 11:14:40 +08:00
15972095207 0362f3f604 feat: add wiki +view,+create,+update,+delete shortcuts with tests 2026-06-02 10:42:25 +08:00
15972095207 1e28d3775d feat: fix wiki +list API path to /{owner}/{repo}/wiki/pages 2026-06-02 09:42:26 +08:00
15972095207 0c76b3bab0 feat: add wiki +list shortcut 2026-06-02 09:21:25 +08:00
15972095207 469a82f1b0 Merge branch 'master' of https://gitlink.org.cn/ylly/gitlink-cli 2026-05-28 20:41:00 +08:00
15972095207 2d1f7e7e3a 测试SSH密钥认证 2026-05-28 20:40:50 +08:00
ylly 2ce7d8dc71 refactor: .devops/自动部署.yml 2026-05-28 20:40:39 +08:00
15972095207 7b1b89ffb2 测试密钥引用 2026-05-28 20:25:03 +08:00
15972095207 b813f62e9b Merge branch 'master' of https://gitlink.org.cn/ylly/gitlink-cli 2026-05-28 20:10:16 +08:00
15972095207 b1acaa1cca 测试流水线 2026-05-28 20:10:05 +08:00
ylly b674a3cc91 feat: .devops/自动部署.yml 2026-05-28 20:09:20 +08:00
ylly e93624b987 refactor: delete .devops/自动部署.yml 2026-05-28 20:09:07 +08:00
15972095207 7847268660 Merge branch 'master' of https://gitlink.org.cn/ylly/gitlink-cli 2026-05-28 20:03:25 +08:00
15972095207 5140b33980 测试SSH密码 2026-05-28 20:02:57 +08:00
ylly 2237675e24 refactor: .devops/自动部署.yml 2026-05-28 20:02:46 +08:00
15972095207 19271c44a6 重新触发流水线 2026-05-28 19:56:55 +08:00
15972095207 9445835c6f 重新触发流水线 2026-05-28 19:47:25 +08:00
15972095207 7ce3eaed51 Merge branch 'master' of https://gitlink.org.cn/ylly/gitlink-cli 2026-05-28 19:39:02 +08:00
15972095207 ccaa1da9a0 测试流水线 2026-05-28 19:37:30 +08:00
ylly 898304a630 feat: .devops/自动部署.yml 2026-05-28 19:34:31 +08:00
wbtiger 2f8b987c2c Merge pull request 'feat(issue): add user lookup shortcuts' (#44) from wangyue111/gitlink-cli:feat/issue-user-shortcuts into master 2026-05-27 01:14:31 +08:00
wbtiger c89e398b46 Merge pull request 'feat(cli): add productivity shortcuts and API body inputs' (#45) from wangyue111/gitlink-cli:feat/cli-productivity-shortcuts into master 2026-05-27 01:08:49 +08:00
wangyue789 00c753b421 feat(pr): add reopen shortcut 2026-05-27 01:08:54 +08:00
wangyue789 2421c1f0c8 feat(api): support body input files 2026-05-27 01:08:54 +08:00
wbtiger 6ce72f07b2 Merge pull request 'feat(member): add repository member shortcuts' (#46) from puygob236/gitlink-cli:feat/member-shortcuts into master 2026-05-27 01:06:12 +08:00
wbtiger 419388f11e merge: resolve conflicts with upstream/master 2026-05-27 01:06:27 +08:00
wbtiger 5369ce65bb Merge pull request 'fix(pr): include closed time in view output' (#49) from dtwdtw/gitlink-cli:fix/issue-14-pr-closed-at into master 2026-05-27 00:52:20 +08:00
wbtiger 27117c0f16 Merge pull request 'feat(repo): add README shortcut' (#52) from dtwdtw/gitlink-cli:fix/issue-17-api-prefix into master 2026-05-27 00:52:04 +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 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
wbtiger 7bcba5aed8 feat(member): add repository member shortcuts (#46)
Add member command group with 8 shortcuts:
- +list, +add, +batch-add, +remove, +role
- +invite-link, +invite-info, +accept-invite

Batch add supports --dry-run, CSV file input, and partial failure
reporting. 12 tests included.

Co-authored-by: Jiachen Li (puygob236) <noreply@gitlink.org.cn>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 00:24:15 +08:00