已关闭
feat: gc repo edit — 更新仓库设置 #522
aflyingto创建于  8月11日关闭于  8月11日
aflyingto成员
8月11日 创建

背景

拆自 gh-parity 专项。对齐 gh repo edit。

API 端点(已就绪)

PATCH /api/v5/repos/{owner}/{repo} — 更新仓库设置
GET /api/v5/repos/{owner}/{repo}/repo_settings — 获取仓库设置
PUT /api/v5/repos/{owner}/{repo}/repo_settings — 更新仓库设置

命令接口

gc repo edit [-R owner/repo] [flags]

Flags: --description <desc>, --homepage <url>, --private/--public, --add-topic <topic>, --remove-topic <topic>, --visibility <visibility>

对齐 gh 参考

gh repo edit [<owner>/<repo>] [--description <desc>] [--homepage <url>] [--visibility public/private]

验收标准

Refs gitcode-cli/cli#506

likedislike
Aaflyingto成员
8月11日 关联了里程碑:gh-parity: 全面对齐 gh CLI
Aaflyingto成员
8月11日 添加了label:enhancementscope/cli
aflyingto成员
8月11日 评论:

验证记录

验证版本: main (787d88a)
验证命令: gc repo edit --help + 源码审查
验证结果:

  • gc repo edit 命令不存在
  • api.Repository 类型已有 Name/Description/Private/DefaultBranch 等字段
  • client.Patch(path, body, response) 方法已实现
  • API PATCH /repos/{owner}/{repo} 支持 8 字段: name/description/homepage/path/private/default_branch/lfs_enabled/tags

结论: 确认功能缺失,Repository 类型和 Patch 方法已就绪。

likedislike
Aaflyingto成员
8月11日 关联了pull request:feat(repo): add gc repo edit — update repository settings
Aaflyingto成员
8月11日 关闭了 issue