fix(issue): preserve metadata during updates #51

Closed
dtwdtw wants to merge 1 commits from dtwdtw/gitlink-cli:fix/issue-18-preserve-update-fields into master
Contributor

问题

issue +update 修改标题或描述时,只提交了标题和描述字段。GitLink API 在部分场景会把未携带的状态、优先级、标签等元数据重置,导致 issue #18 中提到的网页状态显示异常。

修改

  • 读取当前 issue 时同步保留状态、优先级和标签 ID
  • 更新 issue 时默认带回这些元数据
  • 用户显式传入 --state 时仍以命令参数为准
  • 补充元数据保留的单元测试

测试

  • go test ./shortcuts/issue
  • go test ./...

关联 issue #18

## 问题 `issue +update` 修改标题或描述时,只提交了标题和描述字段。GitLink API 在部分场景会把未携带的状态、优先级、标签等元数据重置,导致 issue #18 中提到的网页状态显示异常。 ## 修改 - 读取当前 issue 时同步保留状态、优先级和标签 ID - 更新 issue 时默认带回这些元数据 - 用户显式传入 `--state` 时仍以命令参数为准 - 补充元数据保留的单元测试 ## 测试 - `go test ./shortcuts/issue` - `go test ./...` 关联 issue #18
dtwdtw added 1 commit 2026-05-26 17:37:16 +08:00
wbtiger closed this pull request 2026-06-08 02:11:43 +08:00

Pull request closed

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#51
No description provided.