fix(pr): include closed time in view output #49

Merged
wbtiger merged 1 commits from dtwdtw/gitlink-cli:fix/issue-14-pr-closed-at into master 2026-05-27 00:52:20 +08:00
Contributor

问题

pr +view 查看已关闭 PR 时,接口返回里没有补充关闭时间,导致 issue #14 中提到的字段缺失。

修改

  • 已关闭 PR 且响应缺少 closed_at 时,读取关联 issue 的操作记录补齐关闭时间
  • 保持已有字段不变,开放状态 PR 不额外请求操作记录
  • 增加关闭/开放两种场景的单元测试

测试

  • go test ./shortcuts/pr
  • go test ./...
  • go run . pr +view --owner Gitlink --repo gitlink-cli -i 37 --format json

关联 issue #14

## 问题 `pr +view` 查看已关闭 PR 时,接口返回里没有补充关闭时间,导致 issue #14 中提到的字段缺失。 ## 修改 - 已关闭 PR 且响应缺少 `closed_at` 时,读取关联 issue 的操作记录补齐关闭时间 - 保持已有字段不变,开放状态 PR 不额外请求操作记录 - 增加关闭/开放两种场景的单元测试 ## 测试 - `go test ./shortcuts/pr` - `go test ./...` - `go run . pr +view --owner Gitlink --repo gitlink-cli -i 37 --format json` 关联 issue #14
dtwdtw added 1 commit 2026-05-26 17:25:47 +08:00
wbtiger closed this pull request 2026-05-27 00:35:10 +08:00
wbtiger reopened this pull request 2026-05-27 00:52:19 +08:00
wbtiger merged commit 5369ce65bb into master 2026-05-27 00:52:20 +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#49
No description provided.