Commit Graph

30 Commits

Author SHA1 Message Date
wbtiger ab28113e1d Merge PR #383: feat(pr): add +commits and +check-merge
# Conflicts:
#	internal/i18n/locales/en-US.json
#	internal/i18n/locales/zh-CN.json
2026-07-14 22:50:03 +08:00
wbtiger 1567d96276 Merge PR #319: feat(pr): add merge readiness and branch helper shortcuts
# Conflicts:
#	internal/i18n/locales/en-US.json
#	internal/i18n/locales/zh-CN.json
2026-07-14 22:50:01 +08:00
wbtiger daf1ea4f97 Merge PR #370: feat(pr): add pr +checks showing CI build status for a pull
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 22:50:00 +08:00
wbtiger 2c379e0d75 Merge PR #23: feat: support fork metadata in pr create 2026-07-14 22:50:00 +08:00
wbtiger 2bfc32cfab Merge PR #100: 查看指定时间范围的开发统计
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 22:49:59 +08:00
wbtiger 45b76c485b Merge PR #164: Add pull request review comment management shortcuts
# Conflicts:
#	shortcuts/pr/pr.go
2026-07-14 22:49:55 +08:00
1os21ka23r9navae6mrro a0370fb96b feat(pr): add +commits and +check-merge
- pr +commits: list commits of a pull request
  (GET /pulls/:id/commits)
- pr +check-merge: pre-flight check_can_merge before creating a PR.
  Detects same-branch no-ops and existing duplicate merge requests,
  including the cross-fork case via --fork-project-id (which also
  sets is_original, matching the server's duplicate lookup).

Production-verified on gitlink.org.cn: commits listing, a
'can merge' pass, and duplicate detection that points at the
existing PR. 2 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:33:59 +00:00
林晨 (Leo Cheng) 5c2b309f38
feat(pr): add pr +checks showing CI build status for a pull request
Signed-off-by: 林晨 (Leo Cheng) <chengkelfan@qq.com>
2026-07-08 13:49:42 +08:00
NeeNe 2138fb16d7 feat(pr): add merge readiness and branch helper shortcuts 2026-07-02 14:19:55 +08:00
Mengz e4ed2d1b45 feat(pr): 新增审查评论管理快捷命令 2026-06-22 12:36:23 +08:00
Mengz 104162b480 fix(pr): 补齐 pr +view 的合并与关闭时间字段 2026-06-10 16:12:13 +08:00
Mengz 0736696877 fix: 保持 PR 创建空 body 兼容 2026-06-09 11:04:31 +08:00
Mengz f35225f097 fix: use url-safe base64 for pr compare 2026-06-09 11:03:03 +08:00
Mengz 442f0b9df6 feat: support fork metadata in pr create 2026-06-09 11:02:29 +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
蒋天翔 afed2c9b7e feat: add pr commits/branches/check-merge shortcuts with tests
Add three new shortcuts to the pr module:
- commits: list commits in a pull request (v1 API)
- branches: list branches for PR creation
- check-merge: check if two branches can be merged

Each shortcut includes unit tests covering both success and HTTP error paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:41:39 +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