fix: pr +review now posts a journal comment alongside the formal review #98

Merged
wbtiger merged 1 commits from fix/pr-review-journal-sync into master 2026-06-02 22:08:08 +08:00
Member

问题

pr +review shortcut 只调用了 GitLink 的 reviews API (POST /pulls/:id/reviews),该 API 创建的是 formal review 记录,只显示在 PR 的 "Reviews" 独立面板中,不出现在 PR 主对话 tab。导致贡献者和 reviewer 在 PR 主对话中完全看不到 review 内容。

根因

GitLink(Gitea 系)有两套独立的 PR 反馈系统:

API 作用 可见位置
POST /pulls/:id/reviews 正式 PR Review 独立 Reviews 面板
POST /issues/:issueID/journals PR 对话评论 主对话 tab

修复

pr +review 在创建 formal review 后,自动同步发一条 journal 评论摘要到 PR 主对话。Journal 发送失败不影响 review 本身(静默忽略),确保 review 功能不受 journal 异常影响。

格式:## Review: {approved|rejected|commented}\n\n{content}

改动

  • shortcuts/pr/pr.go:在 review Run 函数中新增 journal 同步逻辑(+14 行)
## 问题 `pr +review` shortcut 只调用了 GitLink 的 reviews API (`POST /pulls/:id/reviews`),该 API 创建的是 formal review 记录,只显示在 PR 的 "Reviews" 独立面板中,**不出现在 PR 主对话 tab**。导致贡献者和 reviewer 在 PR 主对话中完全看不到 review 内容。 ## 根因 GitLink(Gitea 系)有两套独立的 PR 反馈系统: | API | 作用 | 可见位置 | |-----|------|---------| | `POST /pulls/:id/reviews` | 正式 PR Review | 独立 Reviews 面板 | | `POST /issues/:issueID/journals` | PR 对话评论 | **主对话 tab** | ## 修复 `pr +review` 在创建 formal review 后,自动同步发一条 journal 评论摘要到 PR 主对话。Journal 发送失败不影响 review 本身(静默忽略),确保 review 功能不受 journal 异常影响。 格式:`## Review: {approved|rejected|commented}\n\n{content}` ## 改动 - `shortcuts/pr/pr.go`:在 review Run 函数中新增 journal 同步逻辑(+14 行)
wbtiger added 1 commit 2026-06-02 22:02:56 +08:00
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>
wbtiger merged commit 49240b3c02 into master 2026-06-02 22:08:08 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#98
No description provided.