feat(shortcut): 新增 notification 命令组(通知 list/read/read-all/watch) #391
Loading…
Reference in New Issue
No description provided.
Delete Branch "jiangtx/gitlink-cli:pr-shortcut-notification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
GitLink 通知此前只能在 Web 端手工处理,无法脚本化。本 PR 新增
notification命令组,补齐命令行入口,便于 CI/Agent 做通知聚合、批量已读、仓库关注等自动化。改动内容
新增
shortcuts/notification/命令组(4 条子命令):notification +list— 列出通知(--all含已读、--participating仅参与的,支持分页)notification +read— 标记单条通知为已读(-i/--id)notification +read-all— 标记所有通知为已读notification +watch— 关注/取消关注仓库通知(-o/--owner、-r/--repo,--unwatch取消)对应 OpenAPI
/notifications(带 page/limit/all/participating)/notifications/{id}/ PUT/notifications/watchers/{owner}/{repo}.json(--unwatch时 DELETE)测试
shortcuts/notification/notification_test.go(7 个测试):覆盖 list 基础/过滤、read、read-all、watch、unwatch、缺 id 报错等。文档
doc/commands/notification.mddoc/changes/notification-shortcut.mdshortcuts/register.go仅新增 3 行Pull request closed