Commit Graph

32 Commits

Author SHA1 Message Date
wbtiger 26abbcdb34 Merge PR #285: feat(pr): add --login flag to filter list by issue author 2026-07-14 22:49:54 +08:00
wbtiger 63f3b0d0a2 Merge PR #312: feat(pr): 增加行级审查评论快捷命令
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 22:49:54 +08:00
wbtiger d465ac2427 Merge PR #361: feat(pr): add pr +edit to update an open pull request
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 22:49:53 +08:00
wbtiger cf071a72dd Merge PR #365: feat(pr): surface merged_at in pr +view
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 22:49:53 +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 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 16a14b5571 Merge pull request 'feat(pr): add +comments, +comment-edit, +comment-delete' (#385) from Taoyouce/gitlink-cli:feat/pr-comment-crud into master 2026-07-14 22:22:45 +08:00
wbtiger bced605f81 Merge pull request 'fix(ci): CI 固定 Go 1.22 低于 go.mod 要求的 1.26.1,改用 go-version-file 跟随 go.mod' (#419) from Taoyouce/gitlink-cli:fix/ci-go-version into master 2026-07-14 22:22:41 +08:00
maidamaliziasimnw 9b4f890208 fix(ci): CI 安装 golangci-lint 并修复 make lint 全部 11 处报告(errcheck/gosec/misspell)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-10 17:26:52 +00:00
1os21ka23r9navae6mrro cf42b86f65 feat(pr): add +comments, +comment-edit, +comment-delete
Completes the pull-journal comment lifecycle. The CLI could only
create PR comments (via the linked issue's journals); the dedicated
v1 pull journals endpoints also support list/update/destroy:

- pr +comments -i <num>: list a PR's journals
- pr +comment-edit -i <num> -c <journal-id> -b <text> [-s state]
- pr +comment-delete -i <num> -c <journal-id>

The server's UpdateService hard-requires state in
opened|resolved|disabled (omitting it fails with
'State不包含于列表中'), so +comment-edit always sends state,
defaulting to opened, with client-side validation of the enum.
--comment-id is integer-validated.

Production-verified full lifecycle on gitlink.org.cn:
create -> list -> edit (note updated) -> delete. 3 unit tests,
README examples, bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:43:26 +00: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) c4a0ac1f13
feat(pr): surface merged_at in pr +view
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:43:32 +08:00
林晨 (Leo Cheng) 6e71ff9941
feat(pr): add pr +edit to update an open pull request
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 12:11:47 +08: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
Mengz c3dc86511d feat(pr): 增加行级审查评论快捷命令 2026-07-01 11:44:03 +08:00
co63oc fa956dcd92 feat(pr): add --login flag to filter list by issue author 2026-06-26 09:16:01 +08:00
Mengz c9aea1d983 feat(pr): 在列表中显示 PR 编号 2026-06-25 18:13:39 +08:00
Mengz 0b48ec90d8 fix: 修正 Issue 和 PR 列表筛选 2026-06-05 11:43:30 +08:00
wbtiger 83fe18f8c0 refactor: rename pr +close to pr +refuse
The `pr +close` shortcut called the `refuse_merge` API, which is
misleading — "close" suggests a benign operation, but the actual
behavior is to refuse/reject the pull request permanently.

Rename the shortcut to `pr +refuse` so the name matches the API
semantics, and add a warning in the docs that it must never be used
as a substitute for `pr +merge`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 23:20:32 +08:00
wbtiger 49240b3c02 Merge pull request 'fix: pr +review now posts a journal comment alongside the formal review' (#98) from fix/pr-review-journal-sync into master 2026-06-02 22:08:07 +08:00
wbtiger edf2fc30b8 fix: pr +review now posts a journal comment alongside the formal review
The GitLink API has two separate systems for PR feedback:
- POST /pulls/:id/reviews creates a formal review (approve/reject/comment)
  that only appears in the "Reviews" panel
- POST /issues/:issueID/journals creates a comment visible in the main
  PR conversation tab

Previously, `pr +review` only called the reviews API, so the review
content was invisible to the contributor in the main PR conversation.
Now it also posts a journal summary so the review is visible where
contributors expect to see it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 22:03:04 +08:00
whzy 37dfd2e2e2 feat(i18n): add CLI localization foundation 2026-06-01 17:33:10 +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 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 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
fsafasff 7f0f332f77 fix(pr): include closed time in view output 2026-05-26 17:11:33 +08:00
Tiger 49cd590227 Merge PR #26: feat(pr): add review shortcuts
Resolved conflicts between PR #24 (+versions, +version-diff) and PR #26
(+reviews, +review). Unified prReviewsPath() to use existing prV1Path() helper.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 22:12:01 +08:00
wangyue789 fbea42ecce feat(pr): add review shortcuts 2026-05-21 17:20:15 +08:00
wangyue789 e85dd367d8 feat(pr): add patchset version shortcuts 2026-05-21 11:58:47 +08:00
wbtiger 20c3a4ff62 feat(pr): add pr +comment shortcut
Add a convenience command to comment on pull requests directly,
without needing to look up the underlying issue ID first.

Internally resolves the PR's issue ID via pr +view, then posts
to the issues journals API.
2026-05-14 14:23:04 +08:00
wbtiger e892370de8 init gitlink-cli 2026-04-17 10:01:30 +08:00