fix(milestone): +create 的 --description/--due-date 放宽为可选,与平台 API 对齐 #336
Loading…
Reference in New Issue
No description provided.
Delete Branch "Taoyouce/gitlink-cli:fix/milestone-create-optional-fields"
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?
问题
milestone +create把--description与--due-date标记为必填,但平台 v1 API 创建里程碑仅要求name(已在生产环境POST /api/v1/:owner/:repo/milestones用仅含{"name": ...}的请求验证成功)。CLI 侧的额外限制迫使用户为可选字段编造内容。变更
--description/--due-date改为可选;未提供时请求体中省略对应字段milestonePayload的requireAll收敛为requireName,仅校验--nameTestMilestoneCreateNameOnly(断言未提供的可选字段不出现在请求体)doc/changes/milestone-create-optional-fields.md验证
go test ./shortcuts/milestone//go vet/ gofmt 全绿milestone +create -n <name>仅带名称创建成功(验证用里程碑已清理)