fix: detectHTMLResponse 跳过 XML 声明,添加 HTML 响应检测 #6

Merged
lindiwen23 merged 15 commits from dw into master 2026-06-03 09:02:03 +08:00
Collaborator

变更内容

  • 在 client.Do() 中添加 detectHTMLResponse 检测
  • 先 strip 声明再检查 HTML 前缀
  • 返回中文诊断提示替代原始 JSON parse error
  • 修复 Code Review 问题: XML 声明后跟 HTML 时漏检

Code Review 修复

detectHTMLResponse 现在正确处理

## 变更内容 - 在 client.Do() 中添加 detectHTMLResponse 检测 - 先 strip <?xml...?> 声明再检查 HTML 前缀 - 返回中文诊断提示替代原始 JSON parse error - 修复 Code Review 问题: XML 声明后跟 HTML 时漏检 ## Code Review 修复 ✅ detectHTMLResponse 现在正确处理 <?xml version="1.0"?><!DOCTYPE html>
lindiwen23 added 13 commits 2026-06-03 08:56:38 +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>
9843fc7ceb Merge PR #57: feat(issue): support metadata fields
Resolved conflicts with i18n infrastructure from PR #95 and metadata
lookup shortcuts from PR #43.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CI / Build, Lint, Test (pull_request) Failing after 2m2s Details
044e736a1b
fix: detectHTMLResponse 跳过 XML 声明,添加 HTML 响应检测
- 在 json.Unmarshal 之前检测 HTML 响应
- detectHTMLResponse 先 strip <?xml...?> 声明再检查 HTML 前缀
- 返回中文诊断提示替代原始 JSON parse error
- 修复 Code Review: TestDetectHTMLResponse/XML_声明后跟_HTML

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lindiwen23 added 1 commit 2026-06-03 08:58:13 +08:00
CI / Build, Lint, Test (pull_request) Failing after 2m2s Details
9b08029643
merge: resolve client.go conflict, keep XML declaration fix
lindiwen23 added 1 commit 2026-06-03 09:01:39 +08:00
CI / Build, Lint, Test (pull_request) Failing after 1m2s Details
691961072a
feat: issue +journals/+series-update, ci +activate/+deactivate/+authorize
- issue +journals: 查看 Issue 活动日志
- issue +series-update: 批量更新 Issue 状态
- ci +activate: 激活 CI/CD
- ci +deactivate: 停用 CI/CD
- ci +authorize: 检查 CI/CD 授权状态

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lindiwen23 merged commit 20bcdad4ba into master 2026-06-03 09:02:03 +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: jiangtx/gitlink-cli#6
No description provided.