feat(trail): assignee/reviewer/type/priority on update and create · Entire
feat(trail): assignee/reviewer/type/priority on update and create
c74ff3c→main· computermode·1w ago·2 files·+371 added/-83 removed
Wire --add/remove-assignee, --add/remove-reviewer, --type, and --priority onto 'trail update' (replace-set merge via a shared mergeStringSet helper), and --type/--priority/--add-assignee onto 'trail create'. Render type, priority, and reviewers in 'trail show'.
The server rejects a body update combined with any metadata field, so runTrailUpdate now splits body and metadata into separate PATCH calls; this also fixes the interactive update path, which sent status+title+body together.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Sessions
01KX6M84FZMSBVGPJMQX3MYKKCView transcript
Changes
2
cmd/entire/cli
Mtrail_cmd.go+238/-81
- Mtrail_cmd_test.go+133/-2
85 unmodified lines
...
...
Key Commands
cmd.AddCommand(newTrailDeleteCmd()) cmd.AddCommand(newTrailFindingCmd()) cmd.AddCommand(newTrailWatchCmd()) cmd.AddCommand(newTrailApproveCmd()) cmd.AddCommand(newTrailRequestChangesCmd()) cmd.AddCommand(newTrailApprovalsCmd())
return cmd }
func newTrailCreateCmd() *cobra.Command { var title, body, base, branch, status string var assignees []string
cmd := &cobra.Command{ Use: "create", Short: "Create a new trail", RunE: func(cmd *cobra.Command, args []string) error { // Implementation here }, } cmd.Flags().StringVar(&title, "title", "", "Title for the trail") cmd.Flags().StringVar(&body, "body", "", "Body for the trail") cmd.Flags().StringVar(&base, "base", "", "Base branch (defaults to detected default branch)") cmd.Flags().StringVar(&branch, "branch", "", "Branch for the trail") cmd.Flags().StringVar(&status, "status", "", "Initial status (defaults to open)") cmd.Flags().StringSliceVar(&assignees, "add-assignee", nil, "Assign user(s) by login")
return cmd }
func runTrailCreate(cmd *cobra.Command, title, body, base, branch, status string, checkout, noBranch bool) error { // Implementation here }
// Additional functions for processing commands and handling JSON requests go here.